Skip to content

Commit e7db1db

Browse files
authored
p2p/nodestate: fix deadlock during shutdown of les server (#21927)
This PR fixes a deadlock reported here: #21925 The cause is that many operations may be pending, but if the close happens, only one of them gets awoken and exits, the others remain waiting for a signal that never comes.
1 parent a1ddd9e commit e7db1db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

p2p/nodestate/nodestate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ func (ns *NodeStateMachine) opFinish() {
725725
}
726726
ns.opPending = nil
727727
ns.opFlag = false
728-
ns.opWait.Signal()
728+
ns.opWait.Broadcast()
729729
}
730730

731731
// Operation calls the given function as an operation callback. This allows the caller

0 commit comments

Comments
 (0)