* Refactor code to open channel and await for it to be ready.

This commit is contained in:
Derrick Hammer 2023-04-08 18:03:37 -04:00
parent 2d9272cd42
commit 5b443ed66d
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 3 deletions

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