-
Notifications
You must be signed in to change notification settings - Fork 24
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
Fix/1626 handle reachability events #1703
Conversation
55f157d
to
40303c0
Compare
83441eb
to
29fb344
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've put a few comments on the code. Also, I found the commits and their messages a bit confusing — 40303c0’s message doesn't make it clear that it's implementing a new feature, it sounds like a bug fix or a refactor or something. And wouldn't it then make sense to put the test in the same commit that implements the feature?
29fb344
to
08ba4c8
Compare
…tart of the connection that have been just started. There is no certain way to detect whether reachability callback was called because you've just set it up, or because it really has detected reachability of the host. So we rely on a short timeout here - if the callback was called shortly after the setting up reachability, then reconnection shouldn't be done. Whereas if it was called after the certain delay (a threshold) - than it means you are in the middle of the dead-end connection attemt and it should be restarted. See #1713 for more details.
08ba4c8
to
c40bdad
Compare
This is based on #1691
Closes #1626
See commit comments for more details.