Handle SimulateScenario requests (#330)
* Handle SimulateScenario requests * actually use sendLeave * fix local test failures due to filehandle limit
This commit is contained in:
@@ -78,7 +78,7 @@ func HandleParticipantSignal(room types.Room, participant types.Participant, req
|
||||
return nil
|
||||
}
|
||||
case *livekit.SignalRequest_Leave:
|
||||
_ = participant.Close()
|
||||
_ = participant.Close(true)
|
||||
case *livekit.SignalRequest_SubscriptionPermissions:
|
||||
err := room.UpdateSubscriptionPermissions(participant, msg.SubscriptionPermissions)
|
||||
if err != nil {
|
||||
@@ -91,6 +91,12 @@ func HandleParticipantSignal(room types.Room, participant types.Participant, req
|
||||
pLogger.Warnw("could not sync subscribe state", err,
|
||||
"state", msg.SyncState)
|
||||
}
|
||||
case *livekit.SignalRequest_Simulate:
|
||||
err := room.SimulateScenario(participant, msg.Simulate)
|
||||
if err != nil {
|
||||
pLogger.Warnw("could not simulate scenario", err,
|
||||
"simulate", msg.Simulate)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user