From 54904ab1ade4abcd867b9d97b5b78e6ee5bd79a6 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 6 Apr 2023 17:24:06 -0400 Subject: [PATCH] *Bug fix pushRemote --- index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index bc52968..878cd74 100644 --- a/index.js +++ b/index.js @@ -638,6 +638,10 @@ module.exports = class Protomux { this._remote[rid] = { state, pending: null, session: null }; + if (this._slave) { + await this.pushRemote(remoteId); + } + session._remoteId = remoteId; session._fullyOpen(); return; @@ -658,7 +662,7 @@ module.exports = class Protomux { info.incoming.push(remoteId); if (this._slave) { - await this.pushRemotes(); + await this.pushRemote(remoteId); } this._requestSession(protocol, id, info).catch(this._safeDestroyBound);