Add signal handlers (fixes #15)

This commit is contained in:
Audrius Butkevicius
2015-11-21 00:31:20 +00:00
parent 9d9ad6de88
commit 37b79735bf
2 changed files with 33 additions and 1 deletions

View File

@@ -252,6 +252,10 @@ func protocolConnectionHandler(tcpConn net.Conn, config *tls.Config) {
conn.Close()
case msg := <-outbox:
if msg == nil {
conn.Close()
return
}
if debug {
log.Printf("Sending message %T to %s", msg, id)
}