mcuadros/go-syslog — pull request #3 by isaldana (2014-10-07 20:29:33+00:00)
Title: Goroutine cannot be stopped with Kill() when using TCP

When ```Kill()``` is called the goroutine in ```goAcceptConnection()``` goes into an infinite loop and ```Wait()``` blocks forever. When ```Kill()``` closes all the connections ```Accept()``` returns with an error. This change allows to send a signal to exit the goroutine that is doing the ```Accept()``` so ```Wait()``` can proceed. The channel is closed (rather than sending data) to broadcast the signal in case multiple goroutines exist in the ```Accept()``` state.