Add simulate leave request close reason (#2713)
This commit is contained in:
@@ -97,6 +97,7 @@ const (
|
|||||||
ParticipantCloseReasonSimulateMigration
|
ParticipantCloseReasonSimulateMigration
|
||||||
ParticipantCloseReasonSimulateNodeFailure
|
ParticipantCloseReasonSimulateNodeFailure
|
||||||
ParticipantCloseReasonSimulateServerLeave
|
ParticipantCloseReasonSimulateServerLeave
|
||||||
|
ParticipantCloseReasonSimulateLeaveRequest
|
||||||
ParticipantCloseReasonNegotiateFailed
|
ParticipantCloseReasonNegotiateFailed
|
||||||
ParticipantCloseReasonMigrationRequested
|
ParticipantCloseReasonMigrationRequested
|
||||||
ParticipantCloseReasonPublicationError
|
ParticipantCloseReasonPublicationError
|
||||||
@@ -140,6 +141,8 @@ func (p ParticipantCloseReason) String() string {
|
|||||||
return "SIMULATE_NODE_FAILURE"
|
return "SIMULATE_NODE_FAILURE"
|
||||||
case ParticipantCloseReasonSimulateServerLeave:
|
case ParticipantCloseReasonSimulateServerLeave:
|
||||||
return "SIMULATE_SERVER_LEAVE"
|
return "SIMULATE_SERVER_LEAVE"
|
||||||
|
case ParticipantCloseReasonSimulateLeaveRequest:
|
||||||
|
return "SIMULATE_LEAVE_REQUEST"
|
||||||
case ParticipantCloseReasonNegotiateFailed:
|
case ParticipantCloseReasonNegotiateFailed:
|
||||||
return "NEGOTIATE_FAILED"
|
return "NEGOTIATE_FAILED"
|
||||||
case ParticipantCloseReasonMigrationRequested:
|
case ParticipantCloseReasonMigrationRequested:
|
||||||
@@ -161,7 +164,7 @@ func (p ParticipantCloseReason) String() string {
|
|||||||
|
|
||||||
func (p ParticipantCloseReason) ToDisconnectReason() livekit.DisconnectReason {
|
func (p ParticipantCloseReason) ToDisconnectReason() livekit.DisconnectReason {
|
||||||
switch p {
|
switch p {
|
||||||
case ParticipantCloseReasonClientRequestLeave:
|
case ParticipantCloseReasonClientRequestLeave, ParticipantCloseReasonSimulateLeaveRequest:
|
||||||
return livekit.DisconnectReason_CLIENT_INITIATED
|
return livekit.DisconnectReason_CLIENT_INITIATED
|
||||||
case ParticipantCloseReasonRoomManagerStop:
|
case ParticipantCloseReasonRoomManagerStop:
|
||||||
return livekit.DisconnectReason_SERVER_SHUTDOWN
|
return livekit.DisconnectReason_SERVER_SHUTDOWN
|
||||||
|
|||||||
Reference in New Issue
Block a user