diff options
author | Felix Lange <fjl@twurst.com> | 2014-11-27 05:08:54 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2014-11-27 05:08:54 +0800 |
commit | 3a09459c4c3c6d4edefa57a9b245402003ae191e (patch) | |
tree | a0367a0e05b13989ca0dc5a2eb98fced363fc88f | |
parent | 9b85002b700500d421ba7e13ac2062a6b8090a83 (diff) | |
download | dexon-3a09459c4c3c6d4edefa57a9b245402003ae191e.tar dexon-3a09459c4c3c6d4edefa57a9b245402003ae191e.tar.gz dexon-3a09459c4c3c6d4edefa57a9b245402003ae191e.tar.bz2 dexon-3a09459c4c3c6d4edefa57a9b245402003ae191e.tar.lz dexon-3a09459c4c3c6d4edefa57a9b245402003ae191e.tar.xz dexon-3a09459c4c3c6d4edefa57a9b245402003ae191e.tar.zst dexon-3a09459c4c3c6d4edefa57a9b245402003ae191e.zip |
p2p: make Disconnect not hang for peers created with NewPeer
-rw-r--r-- | p2p/peer.go | 1 |
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 } |