[FIXED] Unlock needed to be guarded, could deadlock filestore (#4461)

Needed to check guard for unlock here.

Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
Derek Collison
2023-08-31 08:24:08 -07:00
committed by GitHub

View File

@@ -2991,7 +2991,9 @@ func (fs *fileStore) removeMsg(seq uint64, secure, viaLimits, needFSLock bool) (
fmb.writeIndexInfo()
}
}
fs.mu.Unlock()
if !needFSLock {
fs.mu.Unlock()
}
// Storage updates.
if cb != nil {