Skip to content

Fix ClientStream::close() behaviour#10

Merged
kafkiansky merged 1 commit into0.1.xfrom
fixes/close-client-stream
Mar 1, 2026
Merged

Fix ClientStream::close() behaviour#10
kafkiansky merged 1 commit into0.1.xfrom
fixes/close-client-stream

Conversation

@kafkiansky
Copy link
Contributor

Fix premature blocking on server streaming requests on the client side.

When using server streaming, the client sends a request, calls close() immediately, and starts reading the response. Previously, the future was synchronized on the onRequestEnd() event, which caused the client to wait until the server closed the stream on its side before receiving any messages. This was incorrect.

A request should be considered successfully sent as soon as the request body has been fully transmitted. Errors caused by unexpectedly closed streams — which the previous code attempted to handle — should be handled on the server side instead.

@kafkiansky kafkiansky self-assigned this Mar 1, 2026
@kafkiansky kafkiansky added the bug Something isn't working label Mar 1, 2026
@kafkiansky kafkiansky merged commit cd198b4 into 0.1.x Mar 1, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant