Do not synthesise DISCONNECT on session change. (#2412)

* Do not synthesise DISCONNECT on session change.

v12 clients can handle session change based on identity.

* change for testf

* Squelch participant update if close reason is DUPLICATE_IDENTITY.

* fix test

* comment

* Clean up participant close reason a bit

* fix test

* test
This commit is contained in:
Raja Subramanian
2024-01-31 11:36:50 +05:30
committed by GitHub
parent f960a4f9fb
commit c8b7d486b9
9 changed files with 268 additions and 93 deletions
+2 -8
View File
@@ -213,10 +213,7 @@ func (r *RoomManager) Stop() {
r.lock.RUnlock()
for _, room := range rooms {
for _, p := range room.GetParticipants() {
_ = p.Close(true, types.ParticipantCloseReasonRoomManagerStop, false)
}
room.Close()
room.Close(types.ParticipantCloseReasonRoomManagerStop)
}
r.roomServers.Kill()
@@ -727,10 +724,7 @@ func (r *RoomManager) DeleteRoom(ctx context.Context, req *livekit.DeleteRoomReq
}
} else {
room.Logger.Infow("deleting room")
for _, p := range room.GetParticipants() {
_ = p.Close(true, types.ParticipantCloseReasonServiceRequestDeleteRoom, false)
}
room.Close()
room.Close(types.ParticipantCloseReasonServiceRequestDeleteRoom)
}
return &livekit.DeleteRoomResponse{}, nil
}