Unlock needed to be guarded

Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
Derek Collison
2023-08-31 08:16:47 -07:00
parent 2e1392a234
commit 2b677c231a

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 {