Skip to content
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

reset_input_buffer() can hang on sockets #441

Merged
merged 2 commits into from
Jun 21, 2019
Merged

Conversation

NJDFan
Copy link
Contributor

@NJDFan NJDFan commented Jun 20, 2019

If the remote end closes the socket, the socket object can report read-ready on the select call but the recv() always returns 0 bytes . This empty recv leaves the select reporting ready, so the loop runs endlessly.

@zsquareplusc zsquareplusc merged commit f620b47 into pyserial:master Jun 21, 2019
@zsquareplusc
Copy link
Member

Good catch. Thank you.

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.

None yet

2 participants