aboutsummaryrefslogtreecommitdiffstats
path: root/p2p
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2014-11-27 05:08:54 +0800
committerFelix Lange <fjl@twurst.com>2014-11-27 05:08:54 +0800
commit3a09459c4c3c6d4edefa57a9b245402003ae191e (patch)
treea0367a0e05b13989ca0dc5a2eb98fced363fc88f /p2p
parent9b85002b700500d421ba7e13ac2062a6b8090a83 (diff)
downloadgo-tangerine-3a09459c4c3c6d4edefa57a9b245402003ae191e.tar.gz
go-tangerine-3a09459c4c3c6d4edefa57a9b245402003ae191e.tar.zst
go-tangerine-3a09459c4c3c6d4edefa57a9b245402003ae191e.zip
p2p: make Disconnect not hang for peers created with NewPeer
Diffstat (limited to 'p2p')
-rw-r--r--p2p/peer.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/p2p/peer.go b/p2p/peer.go
index 238d3d9c9..893ba86d7 100644
--- a/p2p/peer.go
+++ b/p2p/peer.go
@@ -97,6 +97,7 @@ func NewPeer(id ClientIdentity, caps []Cap) *Peer {
conn, _ := net.Pipe()
peer := newPeer(conn, nil, nil)
peer.setHandshakeInfo(id, nil, caps)
+ close(peer.closed)
return peer
}