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);