Skip to content

Commit

Permalink
[FIXED] Data race accessing mirror tr (#4512)
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Collison <derek@nats.io>
  • Loading branch information
derekcollison committed Sep 12, 2023
2 parents 573087d + 349158a commit e72bb95
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions server/stream.go
Expand Up @@ -2273,9 +2273,6 @@ func (mset *stream) processInboundMirrorMsg(m *inMsg) bool {
}
}

js, stype := mset.js, mset.cfg.Storage
mset.mu.Unlock()

// Do the subject transform if there's one
if mset.mirror.tr != nil {
m.subj = mset.mirror.tr.TransformSubject(m.subj)
Expand All @@ -2293,7 +2290,9 @@ func (mset *stream) processInboundMirrorMsg(m *inMsg) bool {
}
}

s := mset.srv
s, js, stype := mset.srv, mset.js, mset.cfg.Storage
mset.mu.Unlock()

var err error
if node != nil {
if js.limitsExceeded(stype) {
Expand Down

0 comments on commit e72bb95

Please sign in to comment.