fixed panic when client connected abruptly

This commit is contained in:
David Zhao
2021-01-26 17:38:47 -08:00
parent b96028b4d6
commit a065a01592
10 changed files with 54 additions and 10 deletions
+2 -2
View File
@@ -194,8 +194,8 @@ func (r *Room) broadcastParticipantState(p types.Participant) {
updates := ToProtoParticipants([]types.Participant{p})
for _, op := range r.participants {
// skip itself
if p.ID() == op.ID() {
// skip itself && closed participants
if p.ID() == op.ID() || p.State() == livekit.ParticipantInfo_DISCONNECTED {
continue
}