mcuadros/go-syslog — pull request #4 by isaldana (2014-10-30 00:38:59+00:00)
Title: Add support for TCP connection timeout and to terminate on Kill()

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.