Skip to content

Commit

Permalink
set engine undefined if it's undefined2
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasIO committed Dec 9, 2024
1 parent 9d69e38 commit 61cd821
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/room/Room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1903,10 +1903,12 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
this.log.warn('detected connection state mismatch', {
...this.logContext,
numFailures: consecutiveFailures,
engine: {
closed: !!this.engine?.isClosed,
transportsConnected: !!this.engine?.verifyTransport(),
},
engine: this.engine
? {
closed: this.engine.isClosed,
transportsConnected: this.engine.verifyTransport(),
}
: undefined,
});
if (consecutiveFailures >= 3) {
this.recreateEngine();
Expand Down

0 comments on commit 61cd821

Please sign in to comment.