mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Merge pull request #2655 from nats-io/st-race
Race around accessing storage type
This commit is contained in:
@@ -4867,7 +4867,10 @@ func (mset *stream) processCatchupMsg(msg []byte) (uint64, error) {
|
||||
return 0, errors.New("bad catchup msg")
|
||||
}
|
||||
|
||||
mset.mu.RLock()
|
||||
st := mset.cfg.Storage
|
||||
mset.mu.RUnlock()
|
||||
|
||||
if mset.js.limitsExceeded(st) || mset.jsa.limitsExceeded(st) {
|
||||
return 0, NewJSInsufficientResourcesError()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user