pyseidon
pyseidon copied to clipboard
avoid setting socket listen backlog to 1, handle more concurrent conns
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.