cmd/strelaysrv: Don't leak tickers
This commit is contained in:
parent
7aaa92ac47
commit
33ffb07d31
@ -104,7 +104,9 @@ func protocolConnectionHandler(tcpConn net.Conn, config *tls.Config) {
|
|||||||
go messageReader(conn, messages, errors)
|
go messageReader(conn, messages, errors)
|
||||||
|
|
||||||
pingTicker := time.NewTicker(pingInterval)
|
pingTicker := time.NewTicker(pingInterval)
|
||||||
|
defer pingTicker.Stop()
|
||||||
timeoutTicker := time.NewTimer(networkTimeout)
|
timeoutTicker := time.NewTimer(networkTimeout)
|
||||||
|
defer timeoutTicker.Stop()
|
||||||
joined := false
|
joined := false
|
||||||
|
|
||||||
for {
|
for {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user