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

Read all available socket bytes #1332

Merged
merged 3 commits into from
Jan 11, 2018
Merged

Read all available socket bytes #1332

merged 3 commits into from
Jan 11, 2018

Conversation

dpkp
Copy link
Owner

@dpkp dpkp commented Dec 27, 2017

This addresses the issue discussed in #1315 by repeatedly reading from a non-blocking socket until there are no available bytes remaining. The current code reads only once per select / poll, which causes excessive poll looping when the broker sends many small packets (see #1315 for more discussion).

Copy link
Collaborator

@jeffwidman jeffwidman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

I noticed you only put one space between code and inline comments. PEP8 specifies two spaces, like this: x = True # comment.

@dpkp dpkp merged commit a69320b into master Jan 11, 2018
@jeffwidman jeffwidman deleted the conn_loop_bytes branch January 11, 2018 01:36
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.

2 participants