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

avoid setting socket listen backlog to 1, handle more concurrent conns #1

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

Conversation

michael-go
Copy link

On MacOS, with listen(1), when starting more than ~3 concurrent clients, new clients often get ECONNREFUSED as it can take few ms for the server to accept() each connection. By not setting the backlog in listen(), it seems to handle even 1000 concurrent connections just fine.
Tested also on Linux, where it behaves the same with and without the param.

On MacOS, with listen(1), when starting more than ~3 concurrent clients,
new clients often get ECONNREFUSED as it can take few ms for the server
to accept() each connection. By not setting the backlog in listen(),
it seems to handle even 1000 concurrent connections just fine.
Tested also on Linux, where it behaves the same with and without the
param.
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