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

Make sure that all bytes are sent to the ANCP neighbor #10

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

SoerenBusse
Copy link
Contributor

The method socket.send() isn't guaranteed to send all bytes, even if the socket is blocking. It might happen, that the kernel doesn't accept all bytes, and some bytes are left in the Python send buffer.

Without the fix we're seeing missing bytes at the receiver, e.g. when sending 3000 subscribers in one client.port_up(), only ~800 subscribers are received, while the last subscriber bytes are cut off. When using socket.sendall() everything works flawlessly

socket.send isn't guaranteed to send all bytes, even if the socket is blocking. It might happen, that the kernel doesn't accept all bytes, and some bytes are left in the Python send buffer.
@GIC-de GIC-de merged commit c452593 into GIC-de:master Dec 4, 2024
@coveralls
Copy link

Coverage Status

coverage: 100.0%. remained the same
when pulling 73aa880 on SoerenBusse:master
into 07c6916 on GIC-de:master.

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.

3 participants