From b7cc43783b6bac759dd3ca04dd3d84817db51e07 Mon Sep 17 00:00:00 2001 From: ucwong Date: Wed, 1 Apr 2020 11:23:08 +0800 Subject: [PATCH] whisper/whisperv6 | defer expire ticker stop added --- whisper/whisperv6/whisper.go | 1 + 1 file changed, 1 insertion(+) diff --git a/whisper/whisperv6/whisper.go b/whisper/whisperv6/whisper.go index a7787ca69f..d5e76d994c 100644 --- a/whisper/whisperv6/whisper.go +++ b/whisper/whisperv6/whisper.go @@ -894,6 +894,7 @@ func (whisper *Whisper) processQueue() { func (whisper *Whisper) update() { // Start a ticker to check for expirations expire := time.NewTicker(expirationCycle) + defer expire.Stop() // Repeat updates until termination is requested for {