whisper/whisperv6 | defer expire ticker stop added

This commit is contained in:
ucwong 2020-04-01 11:23:08 +08:00
parent f0be151349
commit b7cc43783b

View file

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