superfly / corrosion

Gossip-based service discovery (and more) for large distributed systems.
https://superfly.github.io/corrosion/
Apache License 2.0
718 stars 22 forks source link

corro-client: fix subscription io::Error backoff #227

Closed pborzenkov closed 4 months ago

pborzenkov commented 4 months ago

Make sure the count is only cleared once the client get a successful request or encounters a non-IO error. Otherwise it never finishes.

Also, since the upper layer usually retries on its own, limit the numer of retries to just 10.

This should be enough in case of a simple server restart, but will provide faster reaction times if the host is down completely.