Compare commits

..

No commits in common. "37cbac3435d2dd2f3579b26fd5154e7b7040bc7c" and "a8dd1d2c20283b380b52ba1e1c3404e8e86b9e70" have entirely different histories.

2 changed files with 4 additions and 2 deletions

3
dist/index.js vendored
View File

@ -28,9 +28,10 @@ class HandshakeProxy extends libhyperproxy_1.Proxy {
return { connect: false }; return { connect: false };
} }
self._node.pool.bindPeer(peer); self._node.pool.bindPeer(peer);
peer.tryOpen(); const open = peer.tryOpen();
// @ts-ignore // @ts-ignore
socket.emit("connect"); socket.emit("connect");
await open;
self._node.pool.peers.add(peer); self._node.pool.peers.add(peer);
self._node.pool.connectedGroups.add(peer.address.getGroup()); self._node.pool.connectedGroups.add(peer.address.getGroup());
self._node.pool.emit("peer", peer); self._node.pool.emit("peer", peer);

View File

@ -49,9 +49,10 @@ export default class HandshakeProxy extends Proxy {
} }
self._node.pool.bindPeer(peer); self._node.pool.bindPeer(peer);
peer.tryOpen(); const open = peer.tryOpen();
// @ts-ignore // @ts-ignore
socket.emit("connect"); socket.emit("connect");
await open;
self._node.pool.peers.add(peer); self._node.pool.peers.add(peer);
self._node.pool.connectedGroups.add(peer.address.getGroup()); self._node.pool.connectedGroups.add(peer.address.getGroup());
self._node.pool.emit("peer", peer); self._node.pool.emit("peer", peer);