p2p: make Disconnect not hang for peers created with NewPeer
This commit is contained in:
parent
9b85002b70
commit
3a09459c4c
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user