add patch 0036-fix-whisper-expire-loop (#1175)

This commit is contained in:
Adam Babik 2018-08-28 10:49:08 +02:00 committed by GitHub
parent 776248a42f
commit a571eeb7a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1,13 @@
diff --git a/whisper/whisperv6/whisper.go b/whisper/whisperv6/whisper.go
index 48bbca3c..482457cb 100644
--- a/whisper/whisperv6/whisper.go
+++ b/whisper/whisperv6/whisper.go
@@ -1060,7 +1060,7 @@ func (whisper *Whisper) expire() {
whisper.stats.messagesCleared++
whisper.stats.memoryCleared += sz
whisper.stats.memoryUsed -= sz
- return true
+ return false
})
whisper.expirations[expiry].Clear()
delete(whisper.expirations, expiry)

View File

@ -1085,7 +1085,7 @@ func (whisper *Whisper) expire() {
whisper.stats.messagesCleared++
whisper.stats.memoryCleared += sz
whisper.stats.memoryUsed -= sz
return true
return false
})
whisper.expirations[expiry].Clear()
delete(whisper.expirations, expiry)