Skip to content

Commit

Permalink
fix(sfu): ensure SFU WebSocket is closed (#1242)
Browse files Browse the repository at this point in the history
Fixes a regression introduced with #1212 where the status of the
underlying SFU WebSocket was incorrectly checked.
  • Loading branch information
oliverlaz authored Jan 16, 2024
1 parent 705ccd8 commit 3f99206
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/client/src/StreamSfuClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export class StreamSfuClient {
reason: string = 'js-client: requested signal connection close',
) => {
this.logger('debug', 'Closing SFU WS connection', code, reason);
if (this.signalWs.readyState === this.signalWs.CLOSED) {
if (this.signalWs.readyState !== this.signalWs.CLOSED) {
this.signalWs.close(code, reason);
}

Expand Down

0 comments on commit 3f99206

Please sign in to comment.