Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closing a stream can throw if messages aren't waited for #43

Closed
glbrntt opened this issue Dec 6, 2024 · 1 comment
Closed

Closing a stream can throw if messages aren't waited for #43

glbrntt opened this issue Dec 6, 2024 · 1 comment

Comments

@glbrntt
Copy link
Collaborator

glbrntt commented Dec 6, 2024

If a client response handler returns before all messages have been received (i.e. the user has what they need from the response) then the stream might throw because of an unclean close.

This can happens because the HTTP/2 stream closes uncleanly and NIO's async channel throws this error.

glbrntt added a commit to glbrntt/grpc-swift-nio-transport that referenced this issue Dec 6, 2024
Motivation:

A couple of tests fail sometimes, the root cause of which is grpc#43.

Modifications:

- Wait for all messages to be received before closing

Result:

Tests are more stable
glbrntt added a commit that referenced this issue Dec 6, 2024
Motivation:

A couple of tests fail sometimes, the root cause of which is #43.

Modifications:

- Wait for all messages to be received before closing

Result:

Tests are more stable
gjcairo added a commit that referenced this issue Jan 17, 2025
@gjcairo
Copy link
Collaborator

gjcairo commented Jan 17, 2025

This has been resolved in apple/swift-nio#3032 and the fix is present in NIO since 2.78.0, which this package already depends on. The workaround is removed in #63. Closing.

@gjcairo gjcairo closed this as completed Jan 17, 2025
glbrntt pushed a commit that referenced this issue Jan 17, 2025
This has been resolved in apple/swift-nio#3032
and the fix is present in NIO since 2.78.0, which this package already
depends on. Removing workaround in tests.
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

No branches or pull requests

2 participants