Skip to content

Commit 3d61421

Browse files
[FIXED] Consumer/JS deadlock (#6460)
Lock ordering was violated resulting in a deadlock. Must not hold consumer lock while trying to grab JS lock. Signed-off-by: Maurice van Veen <[email protected]>
2 parents 4be6af1 + ea4cb3b commit 3d61421

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/consumer.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1866,10 +1866,10 @@ func (o *consumer) deleteNotActive() {
18661866
if o.srv != nil {
18671867
qch = o.srv.quitCh
18681868
}
1869-
if o.js != nil {
1870-
cqch = o.js.clusterQuitC()
1871-
}
18721869
o.mu.Unlock()
1870+
if js != nil {
1871+
cqch = js.clusterQuitC()
1872+
}
18731873

18741874
// Useful for pprof.
18751875
setGoRoutineLabels(pprofLabels{

0 commit comments

Comments
 (0)