Merge pull request #509 from halseth/fix-sendtopeer-deadlock
[trivial] server: fix deadlock in sendToPeer at peer shutdown
This commit is contained in:
commit
3f2a5241c1
@ -958,6 +958,8 @@ func (s *server) sendToPeer(target *btcec.PublicKey,
|
||||
select {
|
||||
case err := <-errChan:
|
||||
return err
|
||||
case <-targetPeer.quit:
|
||||
return fmt.Errorf("peer shutting down")
|
||||
case <-s.quit:
|
||||
return ErrServerShuttingDown
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user