Skip to content

Commit

Permalink
Added ROOM_CLOSED as a DisconnectReason (#778)
Browse files Browse the repository at this point in the history
* Added ROOM_CLOSED as a DisconnectReason

When all independent participants leave the room, the room would close
and disconnect all dependent participants. They should receive the correct
reason. Currently we are sending `UNKNOWN_REASON`

* generated protobuf

* changeset

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
davidzhao and github-actions[bot] committed Aug 2, 2024
1 parent cc4df56 commit 3fbd002
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 51 deletions.
6 changes: 6 additions & 0 deletions .changeset/unlucky-parrots-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"github.com/livekit/protocol": patch
"@livekit/protocol": patch
---

Added RoomClosed as a DisconnectReason
116 changes: 65 additions & 51 deletions livekit/livekit_models.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions protobufs/livekit_models.proto
Original file line number Diff line number Diff line change
Expand Up @@ -373,15 +373,26 @@ message DisabledCodecs {

enum DisconnectReason {
UNKNOWN_REASON = 0;
// the client initiated the disconnect
CLIENT_INITIATED = 1;
// another participant with the same identity has joined the room
DUPLICATE_IDENTITY = 2;
// the server instance is shutting down
SERVER_SHUTDOWN = 3;
// RoomService.RemoveParticipant was called
PARTICIPANT_REMOVED = 4;
// RoomService.DeleteRoom was called
ROOM_DELETED = 5;
// the client is attempting to resume a session, but server is not aware of it
STATE_MISMATCH = 6;
// client was unable to connect fully
JOIN_FAILURE = 7;
// Cloud-only, the server requested Participant to migrate the connection elsewhere
MIGRATION = 8;
// the signal websocket was closed unexpectedly
SIGNAL_CLOSE = 9;
// the room was closed, due to all Standard and Ingress participants having left
ROOM_CLOSED = 10;
}

message RTPDrift {
Expand Down

0 comments on commit 3fbd002

Please sign in to comment.