You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling client.Wait, we want to avoid the default backoff behavior,
because we want to achieve a quick response back once the server becomes
active.
To do this, without modifying the entire client's exponential backoff
configuration, we can use conn.ResetConnectBackoff, while attempting to
reconnect every second.
Here are some common scenarios:
- Server is listening: the call to Info succeeds quickly, and we return.
- Server is listening, but is behind several proxies and so latency is
high: the call to Info succeeds slowly (up to minConnectTimeout=20s),
and we return.
- Server is not listening and gets "connection refused": the
call to Info fails quickly, and we wait a second before retrying.
- Server is not listening and does not respond (e.g. firewall dropping
packets): the call to Info fails slowly (by default after
minConnectTimeout=20s). After the call fails, we wait a second before
retrying.
Signed-off-by: Justin Chadwell <[email protected]>
(cherry picked from commit f1d7f2e)
Signed-off-by: Justin Chadwell <[email protected]>
0 commit comments