Compare commits

..

No commits in common. "c459f1f0a38e579d3651e12f3399cc9afdabc198" and "2d9272cd42784fa5166f5dba8afc1c59ed535621" have entirely different histories.

2 changed files with 5 additions and 2 deletions

3
dist/index.js vendored
View File

@ -64,7 +64,8 @@ export default class ProtomuxRPC extends EventEmitter {
encoding: response, encoding: response,
onmessage: this._onresponse.bind(this), onmessage: this._onresponse.bind(this),
}); });
await this._channel.open(options?.handshake); this._channel.open(options?.handshake);
await this._channel.ready;
} }
_onopen(handshake) { _onopen(handshake) {
this.emit("open", handshake); this.emit("open", handshake);

View File

@ -80,7 +80,9 @@ export default class ProtomuxRPC extends EventEmitter {
onmessage: this._onresponse.bind(this), onmessage: this._onresponse.bind(this),
}); });
await this._channel.open(options?.handshake); this._channel.open(options?.handshake);
await this._channel.ready;
} }
_onopen(handshake: any) { _onopen(handshake: any) {