p2p: make Disconnect not hang for peers created with NewPeer

This commit is contained in:
Felix Lange 2014-11-26 22:08:54 +01:00
parent 9b85002b70
commit 3a09459c4c

View File

@ -97,6 +97,7 @@ func NewPeer(id ClientIdentity, caps []Cap) *Peer {
conn, _ := net.Pipe() conn, _ := net.Pipe()
peer := newPeer(conn, nil, nil) peer := newPeer(conn, nil, nil)
peer.setHandshakeInfo(id, nil, caps) peer.setHandshakeInfo(id, nil, caps)
close(peer.closed)
return peer return peer
} }