* Refactor code to open channel and await for it to be ready.
This commit is contained in:
parent
2d9272cd42
commit
5b443ed66d
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue