Skip to content

fix: dispatch NoResponse check before empty-Type guard (#116) - #122

Merged
blaspat merged 1 commit into
mainfrom
fix/dispatch-noresponse-order
Aug 11, 2026
Merged

fix: dispatch NoResponse check before empty-Type guard (#116)#122
blaspat merged 1 commit into
mainfrom
fix/dispatch-noresponse-order

Conversation

@blaspat

@blaspat blaspat commented Aug 11, 2026

Copy link
Copy Markdown
Owner

What

The dispatch loop checks Type == "" (empty envelope guard) before checking NoResponse (streaming marker). Since chunked handlers return Envelope{NoResponse: true} with an empty Type, the dispatch fires ErrUnhandled instead of honoring NoResponse.

"wire: handler returned no response"

Fix

Move the NoResponse check above the empty-Type guard. NoResponse envelopes intentionally have an empty Type — the handler already wrote its own response via WriteEnvelope.

Also removes the duplicate NoResponse block that was sitting below the ID-echo guard.

Signed-off-by: Blasius Patrick <blasius.patrick@gmail.com>
@blaspat
blaspat merged commit bc2003d into main Aug 11, 2026
14 checks passed
@blaspat
blaspat deleted the fix/dispatch-noresponse-order branch August 11, 2026 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant