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
1 changed files with 1 additions and 1 deletions
|
@ -2053,7 +2053,7 @@ func (p *Peer) Disconnect() {
|
||||||
func (p *Peer) start() error {
|
func (p *Peer) start() error {
|
||||||
log.Tracef("Starting peer %s", p)
|
log.Tracef("Starting peer %s", p)
|
||||||
|
|
||||||
negotiateErr := make(chan error)
|
negotiateErr := make(chan error, 1)
|
||||||
go func() {
|
go func() {
|
||||||
if p.inbound {
|
if p.inbound {
|
||||||
negotiateErr <- p.negotiateInboundProtocol()
|
negotiateErr <- p.negotiateInboundProtocol()
|
||||||
|
|
Loading…
Reference in a new issue