TCP hardlimits
fixes #326 (closed)
Several bugs fixed:
- TCP client count can be limited by the config variable
max_tcp_clientsinsystem(so there are free descriptors for autonomous operation) - Aggressive limits when client connects, but doesn't start sending data in time
- Throttling doesn't affect activity other then
accept() - Possible resource leak on
tcp_sweep - Bad logic (started reading from socket before checking for error activity first)
- Bad logic (could close master socket on fd exhaustion)
Also merge to master.