cmd/strelaysrv: Don't leak tickers

This commit is contained in:
Jakob Borg 2017-08-30 18:46:50 +02:00
parent 7aaa92ac47
commit 33ffb07d31
1 changed files with 2 additions and 0 deletions

View File

@ -104,7 +104,9 @@ func protocolConnectionHandler(tcpConn net.Conn, config *tls.Config) {
go messageReader(conn, messages, errors)
pingTicker := time.NewTicker(pingInterval)
defer pingTicker.Stop()
timeoutTicker := time.NewTimer(networkTimeout)
defer timeoutTicker.Stop()
joined := false
for {