Handle simulated leave (#333)

This commit is contained in:
David Zhao
2022-01-11 23:34:27 -08:00
committed by GitHub
parent e67db84b3b
commit b05d154d12
3 changed files with 8 additions and 3 deletions
+5
View File
@@ -529,6 +529,11 @@ func (r *Room) SimulateScenario(participant types.LocalParticipant, simulateScen
if err := participant.Close(false); err != nil {
return err
}
case *livekit.SimulateScenario_ServerLeave:
r.Logger.Infow("simulating server leave", "participant", participant.Identity())
if err := participant.Close(true); err != nil {
return err
}
}
return nil
}