pyseidon icon indicating copy to clipboard operation
pyseidon copied to clipboard

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

Open michael-go opened this issue 1 year ago • 0 comments

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.

michael-go avatar May 24 '23 13:05 michael-go