cmd/devp2p, cmd/wnode, whisper: add missing calls to Timer.Stop (#20843)

This commit is contained in:
ucwong
2020-04-01 22:12:01 +08:00
committed by GitHub
parent d56dc038d2
commit 1e2e1b41f8
3 changed files with 3 additions and 0 deletions

View File

@ -905,6 +905,7 @@ func (whisper *Whisper) update() {
defer whisper.wg.Done()
// Start a ticker to check for expirations
expire := time.NewTicker(expirationCycle)
defer expire.Stop()
// Repeat updates until termination is requested
for {