When a client maintains a TCP connection open, the server is not able to terminate since it waits for the client to disconnect. This adds support for a timeout on idle connections. Also support was added to terminate right after a successful read if Kill() is called.
I initially setup rsyslog to relay logs to this server using TCP. rsyslog maintains a connection open for a long time so this server was never able to exit. A good timeout setting is about 15 seconds.
When a client maintains a TCP connection open, the server is not able to terminate since it waits for the client to disconnect. This adds support for a timeout on idle connections. Also support was added to terminate right after a successful read if
Kill()
is called.I initially setup
rsyslog
to relay logs to this server using TCP.rsyslog
maintains a connection open for a long time so this server was never able to exit. A good timeout setting is about 15 seconds.