Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
sonnyp committed Jan 9, 2025
1 parent 14062a1 commit 0b6473b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/connection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class Connection extends EventEmitter {
}

_detachSocket() {
this.#socketListeners?.unsubscribe(this.socket);
this.socket && this.#socketListeners?.unsubscribe(this.socket);
this.socket = null;
}

Expand Down Expand Up @@ -139,7 +139,7 @@ class Connection extends EventEmitter {
}

_detachParser() {
this.#parserListeners?.unsubscribe(this.parser);
this.parser && this.#parserListeners?.unsubscribe(this.parser);
this.parser = null;
this.root = null;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/websocket/lib/Socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ export default class Socket extends EventEmitter {
this.emit("close", !event.wasClean, event);
},
});
this.#listeners.subscribe(socket);
this.#listeners.subscribe(this.socket);
}

_detachSocket() {
this.url = null;
this.#listeners?.unsubscribe(this.socket);
this.socket && this.#listeners?.unsubscribe(this.socket);
this.socket = null;
}

Expand Down

0 comments on commit 0b6473b

Please sign in to comment.