message broker: read also from sealed memory buffer

This commit is contained in:
Chris Lu
2020-04-20 17:26:38 -07:00
parent bd43c62fbd
commit 4bf959edf0
3 changed files with 22 additions and 2 deletions

View File

@@ -122,6 +122,11 @@ func (m *LogBuffer) loopInterval() {
m.Unlock()
m.flushChan <- toFlush
time.Sleep(m.flushInterval)
if m.notifyFn != nil {
// check whether blocked clients are already disconnected
println("notifying log buffer readers")
m.notifyFn()
}
}
}