-
Notifications
You must be signed in to change notification settings - Fork 1k
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
A connection opened with connect_lazy
does not attempt to reconnect if the server is unavailable on first request
#452
Comments
No worries! |
alce
added a commit
to alce/tonic
that referenced
this issue
Sep 19, 2020
Channels created with lazy connections never try to reconnect if the first connection attempt fails. This is because `Reconnect` returns `Poll::Ready(Err)` on poll_ready and the service is considered dead. This change passes a flag to Reconnect to signal if the connection is intended to be lazy, in which case reconnect returns the error on the next call. fixes hyperium#452
@LucioFranco there is a possible solution in #458 |
alce
added a commit
that referenced
this issue
Sep 23, 2020
* fix(transport): reconnect lazy connections after first failure Channels created with lazy connections never try to reconnect if the first connection attempt fails. This is because `Reconnect` returns `Poll::Ready(Err)` on poll_ready and the service is considered dead. This change passes a flag to Reconnect to signal if the connection is intended to be lazy, in which case reconnect returns the error on the next call. fixes #452
This was referenced Mar 18, 2021
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
Platform
Linux 4.9.104-microsoft-standard (WSL2), Linux 5.8.6-NixOS (NixOS)
Crates
Likely
tonic
itself.Description
If a connection is created with
connect_lazy
, a first gRPC call is made, and the server is not available (e.g. not running or rejecting incoming connections), subsequent gRPC calls will not attempt to reconnect to the server, and will instead return an error.Code and reproducible setup (Docker) here: https://github.com/K900/tonic-issue-repro
Following up from a Discord conversation with @LucioFranco.
The text was updated successfully, but these errors were encountered: