Skip to content

Commit

Permalink
Add page leave log (#1056)
Browse files Browse the repository at this point in the history
* Add page leave log

* Create late-rabbits-share.md
  • Loading branch information
lukasIO authored Mar 1, 2024
1 parent f203424 commit 935ba3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/late-rabbits-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-client": patch
---

Add page leave log
1 change: 1 addition & 0 deletions src/room/Room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,7 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
}

private onPageLeave = async () => {
this.log.info('Page leave detected, disconnecting', this.logContext);
await this.disconnect();
};

Expand Down

0 comments on commit 935ba3c

Please sign in to comment.