mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-16 11:04:42 -07:00
Check that we have mirror still to not panic and deadlock/hang
Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -1139,6 +1139,10 @@ func (mset *stream) processMirrorMsgs() {
|
||||
|
||||
// Grab stream quit channel.
|
||||
mset.mu.Lock()
|
||||
if mset.mirror == nil {
|
||||
mset.mu.Unlock()
|
||||
return
|
||||
}
|
||||
msgs, mch, qch := mset.mirror.msgs, mset.mirror.msgs.mch, mset.qch
|
||||
// Set the last seen as now so that we don't fail at the first check.
|
||||
mset.mirror.last = time.Now()
|
||||
|
||||
Reference in New Issue
Block a user