-
Notifications
You must be signed in to change notification settings - Fork 272
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
Bug: Active Streams Silently Killed after connectionTimeout
#752
Comments
I'm experiencing this issue as well. It's causing enough of a headache that I'm considering ripping out streams altogether from my app and hosting a client and both ends of the connection for bi-directional communication. |
I spent sometime looking into this based on the code provided and noticed that the stream actually does not report back any information about the connection being lost or disconnected. I added to the a onConnectionStateChanged listener to the clientChannel that just prints out the state. This is what was reported in the logs.
I would have expected the connection state to change to a disconnecting state or failure state at this point. |
Maybe a better way to phrase my problem: is this a limitation of gRPC? Or is this a bug in this package? I am very curious if other languages implement this in the same manner. |
connectionTimeout
connectionTimeout
Any active stream(s) are silently killed without notifying the listeners once the first gRPC call is made after the
ClientChannel
'sconnectionTimeout
is reached.This feels like a bug to me.
gRPC Package Version Info:
Platform: Linux
Repro steps
ChannelOptions.connectionTimeout
amount of timeonDone
)Expected result: If the server detects a stream cancellation, the client (listener) should be notified via a stream error or the
onDone
event.Actual result: The server ends the stream and the client continues to listen indefinitely.
Details
It appears that streams active when the connection timeout occurs will stay in a working / data receiving state until a new gRPC call is made after the connection timeout.
To get around this, I have had to implement heartbeats in my streams so my client can detect if it actually stopped receiving data altogether.
The text was updated successfully, but these errors were encountered: