Compare commits

...

2 Commits

Author SHA1 Message Date
Derrick Hammer 37cbac3435
*Update dist 2023-02-18 09:49:51 -05:00
Derrick Hammer 3da2a3e8df
*Don't await on tryOpen 2023-02-18 09:49:33 -05:00
2 changed files with 2 additions and 4 deletions

3
dist/index.js vendored
View File

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

View File

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