diff --git a/p2p.js b/p2p.js index 0bf55ea..e48c482 100644 --- a/p2p.js +++ b/p2p.js @@ -233,6 +233,7 @@ class MeshNet { if (this._pendingPeer && this._pendingPeer.peer === peer) { this._pendingPeer.peerId = msg.peerId; this._pendingPeer.connected = true; + this._pendingPeer = null; if (this.onpeerconnect) this.onpeerconnect(msg.peerId); if (this.isHost) { setTimeout(() => this._createPendingPeer(), 300);