Skip to content

Commit

Permalink
Fix reconnect promise not being reset after reconnect attempts are ex…
Browse files Browse the repository at this point in the history
…hausted (#369)
  • Loading branch information
lukasIO committed Aug 2, 2022
1 parent d96cb42 commit a3d6de6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/pink-colts-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'livekit-client': patch
---

Fix reconnect promise not being reset after reconnect attempts are exhausted
2 changes: 1 addition & 1 deletion src/room/Room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -648,8 +648,8 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
if (this.connectFuture === this.reconnectFuture) {
this.connectFuture?.reject(undefined);
this.connectFuture = undefined;
this.reconnectFuture = undefined;
}
this.reconnectFuture = undefined;

this.participants.forEach((p) => {
p.tracks.forEach((pub) => {
Expand Down

0 comments on commit a3d6de6

Please sign in to comment.