Skip to content

Commit

Permalink
Merge pull request btcsuite#1228 from Roasbeef/fix-peer-goroutine-leak
Browse files Browse the repository at this point in the history
peer: ensure the version negotiation goroutine will always exit
  • Loading branch information
Roasbeef authored Jul 22, 2018
2 parents f673a4b + 088eec6 commit 9a2f952
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion peer/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9a2f952

Please sign in to comment.