Skip to content

Commit

Permalink
[FIXED] mset.noInterest requires write lock
Browse files Browse the repository at this point in the history
Signed-off-by: Maurice van Veen <[email protected]>
  • Loading branch information
MauriceVanVeen committed Nov 13, 2024
1 parent e1b2f5d commit 8898d64
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5787,12 +5787,14 @@ func (o *consumer) cleanupNoInterestMessages(mset *stream, ignoreInterest bool)
return
}

mset.mu.RUnlock()
mset.mu.Lock()
for seq := start; seq <= stop; seq++ {
if mset.noInterest(seq, co) {
rmseqs = append(rmseqs, seq)
}
}
mset.mu.RUnlock()
mset.mu.Unlock()

// These can be removed.
for _, seq := range rmseqs {
Expand Down

0 comments on commit 8898d64

Please sign in to comment.