mirror of
https://github.com/btcsuite/btcd.git
synced 2024-11-20 10:11:49 +01:00
Merge pull request #1228 from Roasbeef/fix-peer-goroutine-leak
peer: ensure the version negotiation goroutine will always exit
This commit is contained in:
commit
9a2f952402
@ -2053,7 +2053,7 @@ func (p *Peer) Disconnect() {
|
||||
func (p *Peer) start() error {
|
||||
log.Tracef("Starting peer %s", p)
|
||||
|
||||
negotiateErr := make(chan error)
|
||||
negotiateErr := make(chan error, 1)
|
||||
go func() {
|
||||
if p.inbound {
|
||||
negotiateErr <- p.negotiateInboundProtocol()
|
||||
|
Loading…
Reference in New Issue
Block a user