Unverified Commit e7db1dbc authored by Martin Holst Swende's avatar Martin Holst Swende Committed by GitHub

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.
parent a1ddd9e1
...@@ -725,7 +725,7 @@ func (ns *NodeStateMachine) opFinish() { ...@@ -725,7 +725,7 @@ func (ns *NodeStateMachine) opFinish() {
} }
ns.opPending = nil ns.opPending = nil
ns.opFlag = false ns.opFlag = false
ns.opWait.Signal() ns.opWait.Broadcast()
} }
// Operation calls the given function as an operation callback. This allows the caller // Operation calls the given function as an operation callback. This allows the caller
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment