-
Notifications
You must be signed in to change notification settings - Fork 269
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
Reconnect logic #691
Comments
@haf did you resolve this issue somehow? |
No, no solution, still need one. |
as I correctly understand, you also need to know status of this stream to make either reconnect or close, yes? @haf |
it is inside http2 library, but it's hidden |
No I don't believe in statuses; if I try to send and get timeouts or ECONNRST or similar back, then I want to try to reconnect. |
how you handle this issue right now? |
I moved away from streaming for this reason; I don't have a solution yet. But if I really need one I'm going to dig into this library and maybe I'd wrap the channel or make it a factory method instead of an instance (if it needs to be recreated) |
There have already been some questions about how to reconnect. My use-case is bi-directional streaming with gRPC; with a connection that is alive for as long as the app is alive (but like we know the OS might/will close connections after a while). I want to make sure the gRPC client reconnects and retries to send unsent messages.
These issues mentioned reconnection behaviour:
I'd like to get an explainer on how exactly to write "some code".
For background, I keep track of the state like this:
Then at some point, due to networks being networks; this gets logged:
version: 3.2.4
The ultimate API for me would be that I can rely on the client to keep this stream open; how exactly this would work, I'm not sure, so I'm asking you.
Repro steps
OR
Expected result: either that we can resume the connection (incl its state server-side with its python gRPC impl); or that there's some guidance on how to build resilient gRPC clients and hooks for me to hook into to resume.
Actual result: the app hangs, because the socket is dead and I don't see how to reconnect it
The text was updated successfully, but these errors were encountered: