go-syslog
go-syslog copied to clipboard
do not block accepting connections
When using a plain TCP listener, goScanConnection creates some data structures and moves on to scan which is wrapped in a goroutine.
When using a TLS listener, goScanConnection does not return until the TLS handshake is complete. A lot can go wrong during this stage.
This change wraps goScanConnection in a goroutine to avoid blocking accepting the next connection.
Please consider this PR, it will be appreciated by anyone looking to use the TLS functionality.