*need to use _mux on Channel calls to syncState

This commit is contained in:
Derrick Hammer 2023-04-05 20:03:12 -04:00
parent 5907966d77
commit d7dede7894
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 4 deletions

View File

@ -81,7 +81,7 @@ class Channel {
if (this._handshake) this._handshake.encode(state, handshake); if (this._handshake) this._handshake.encode(state, handshake);
this._mux._write0(state.buffer); this._mux._write0(state.buffer);
await this.syncState?.(); await this._mux.syncState?.();
} }
_dec() { _dec() {
@ -96,7 +96,7 @@ class Channel {
async _fullyOpenSoon() { async _fullyOpenSoon() {
this._mux._remote[this._remoteId - 1].session = this; this._mux._remote[this._remoteId - 1].session = this;
queueTick(this._fullyOpen.bind(this)); queueTick(this._fullyOpen.bind(this));
await this.syncState?.(); await this._mux.syncState?.();
} }
_fullyOpen() { _fullyOpen() {
@ -154,7 +154,7 @@ class Channel {
this._track(this.onclose(isRemote, this)); this._track(this.onclose(isRemote, this));
if (this._active === 0) this._destroy(); if (this._active === 0) this._destroy();
await this.syncState?.(); await this._mux.syncState?.();
} }
_destroy() { _destroy() {
@ -190,7 +190,7 @@ class Channel {
state.buffer[1] = 3; state.buffer[1] = 3;
c.uint.encode(state, this._localId); c.uint.encode(state, this._localId);
await this._close(false); await this._mux._close(false);
this._mux._write0(state.buffer); this._mux._write0(state.buffer);
} }