10000 TCPAsyncSocketConnection bugfix by MeRuslan · Pull Request #149 · Dinnerbone/mcstatus · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

TCPAsyncSocketConnection bugfix #149

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 5 commits into from
Jul 7, 2021

Conversation

MeRuslan
Copy link
Contributor
@MeRuslan MeRuslan commented Jun 22, 2021

TCPAsyncSocketConnection uses asyncio.wait_for wrapper only when connecting.
Now it uses it for reading as well, as per usual, test included.

@MeRuslan
Copy link
Contributor Author

If you feed a server that allows connecting, but does not respond, it would simply hang on forever in server.async_status().
This PR fixes that.

@MeRuslan
Copy link
Contributor Author
MeRuslan commented Jun 23, 2021

PS it breaks one of the existing tests, but I'm not sure why exactly.
Cause nothing really changes.

Frankly, I think that test does not works as intended, even without my changes.
I.e. without my changes the exception is raised nonetheless raise IOError("Received invalid ping response packet."), ping is successful only the second time it's called, which is a test bug it seems.

Waiting on the read method with a timeout causes reads to be individual
and closing the connection before the client is done caused a test
failure.
@kevinkjt2000
Copy link
Collaborator

I found the cause was related to closing the client connection early in that test that was failing. I've fixed that and python 3.6 compatibilities, so I'm about to release v6.3.0 which includes this.

kevinkjt2000 added a commit that referenced this pull request Jul 7, 2021
@kevinkjt2000 kevinkjt2000 merged commit 477f636 into Dinnerbone:master Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
< 4481 span class="css-truncate sidebar-progress-bar"> None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0