Skip to content

Fix stuck reconnection #128

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

Merged
merged 4 commits into from
Mar 18, 2019
Merged

Conversation

Totktonada
Copy link
Member

@Totktonada Totktonada commented Mar 14, 2019

Fixes #108.
Fixes #125.

@Totktonada Totktonada requested a review from bigbes March 14, 2019 16:26
When we call ping() at a not connected socket the following call trace
is proceeded: ping() -> _send_request() -> _opt_reconnect() -> {here
self.socket is None} -> connect() -> {inconnect is set to True} ->
connect_basic() -> connect_tcp() -> raise NetworkError -> fall though
try-except in connect() -> use null self._socket when try to send a
packet.

A test case ('test_01_simple') will be added within the following
commit.
There are cases when this flag is not set appropriately, that lead to a
reconnection stuck: at least the case that was fixed in the commit 'Fix
stuck autoreconnect case'.

To more on that, this flag was only needed to workaround Windows-related
bug with broken socket liveness check. Now it is fixed, so it is safe to
remove it.

Fixes #108.
@Totktonada Totktonada force-pushed the Totktonada/gh-125-add-reconnection-test branch from f67a5c1 to 9ccd0bd Compare March 18, 2019 19:19
@Totktonada Totktonada merged commit cd11e28 into master Mar 18, 2019
@Totktonada Totktonada deleted the Totktonada/gh-125-add-reconnection-test branch March 18, 2019 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant