-
Notifications
You must be signed in to change notification settings - Fork 371
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
Add hard fileno #366
Add hard fileno #366
Conversation
This allows wstunnel to use fds>1024. Otherwise heavy use can easily run out of file descriptors on connection attempts. While there will still be a limit, it is significantly higher (~500 times on my system) which provides enough headroom for connections to be torn down and fds to be closed.
Hello, Thank you for the PR, it is appreciated. In addition, this crate only works on linux/macos, so it should be gated by a conditonnal compilation cfg. Or maybe make it the default without any flag for those os. |
Hi, sorry for the late reply While I fully agree that the hard limit should be set by the environment, the soft limit is mostly a historical issue with the 1024 FDs support by Yea, gating to the OS makes sense. I'll have to figure out the syntax if that's the only issue. |
I think we can make it the default without any flags and merge the PR. So calling everytime |
Done. Do you have a preference about squashing? |
That's perfect, thank you. |
This allows wstunnel to use fds>1024.
Otherwise heavy use can easily run out of file descriptors on connection
attempts.
While there will still be a limit, it is significantly higher (~500
times on my system) which provides enough headroom for connections to be
torn down and fds to be closed.