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

fix socket buffer size detection #664

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

garabik
Copy link
Contributor

@garabik garabik commented Sep 24, 2024

In find_max_buffer_size, if the maximum network buffer size is under 1MB, the loop will reach and return zero with unpredictable consequences (e.g. my python coredumps).

This implements "proper" way of finding the buffer size by interval halving. Note that I am not quite able to test it thoroughly, all my linux installations (and some Windows I managed to get access to) seem to happily access any (big) buffer size, regardless of net.core.{r,w}mem_max.

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