Merge pull request #1228 from Roasbeef/fix-peer-goroutine-leak

peer: ensure the version negotiation goroutine will always exit
This commit is contained in:
Olaoluwa Osuntokun 2018-07-21 19:02:38 -07:00 committed by GitHub
commit 9a2f952402
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()