mirror of
https://github.com/livekit/livekit.git
synced 2026-07-30 05:19:31 +00:00
Additional closure reasons (#958)
This commit is contained in:
@@ -81,6 +81,8 @@ const (
|
||||
ParticipantCloseReasonSimulateNodeFailure
|
||||
ParticipantCloseReasonSimulateServerLeave
|
||||
ParticipantCloseReasonNegotiateFailed
|
||||
ParticipantCloseReasonMigrationRequested
|
||||
ParticipantCloseReasonOvercommitted
|
||||
)
|
||||
|
||||
func (p ParticipantCloseReason) String() string {
|
||||
@@ -121,6 +123,10 @@ func (p ParticipantCloseReason) String() string {
|
||||
return "SIMULATE_SERVER_LEAVE"
|
||||
case ParticipantCloseReasonNegotiateFailed:
|
||||
return "NEGOTIATE_FAILED"
|
||||
case ParticipantCloseReasonOvercommitted:
|
||||
return "OVERCOMMITTED"
|
||||
case ParticipantCloseReasonMigrationRequested:
|
||||
return "MIGRATION_REQUESTED"
|
||||
default:
|
||||
return fmt.Sprintf("%d", int(p))
|
||||
}
|
||||
@@ -149,6 +155,8 @@ func (p ParticipantCloseReason) ToDisconnectReason() livekit.DisconnectReason {
|
||||
return livekit.DisconnectReason_SERVER_SHUTDOWN
|
||||
case ParticipantCloseReasonSimulateServerLeave:
|
||||
return livekit.DisconnectReason_SERVER_SHUTDOWN
|
||||
case ParticipantCloseReasonOvercommitted:
|
||||
return livekit.DisconnectReason_SERVER_SHUTDOWN
|
||||
case ParticipantCloseReasonNegotiateFailed:
|
||||
return livekit.DisconnectReason_STATE_MISMATCH
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user