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
1 changed files with 1 additions and 0 deletions

View File

@ -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
}