Compare commits

..

2 Commits

2 changed files with 2 additions and 5 deletions

3
dist/index.js vendored
View File

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

View File

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