Skip to content

fix: map remaining livekit.DisconnectReason to SDK's DisconnectReason #641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

prlanzarin
Copy link

@prlanzarin prlanzarin commented Apr 30, 2025

A few entries in livekit.DisconnectReason are not explicitly mapped to
the SDK's DisconnectReason. This causes them to be flagged as
"OtherReason", even though some of them could be useful if explicitly
mapped. e.g.: ROOM_DELETED, MIGRATION, SERVER_SHUTDOWN,
CONNECTION_TIMEOUT mean different things and may be treated differently.

Map ROOM_DELETED, MIGRATION and SERVER_SHUTDOWN to unique reasons.
Map CONNECTION_TIMEOUT and SIP_TRUNK_FAILURE to Failed.
The only remaining livekit.DisconnectReason is UNKNOWN_REASON, which
makes sense as OtherReason.

A few entries in livekit.DisconnectReason are not explicitly mapped to
the SDK's DisconnectReason. This causes them to be flagged as
"OtherReason", even though some of them could be useful if explicitly
mapped. e.g.: ROOM_DELETED, MIGRATION, SERVER_SHUTDOWN,
CONNECTION_TIMEOUT mean different things and may be treated differently.

Map ROOM_DELETED, MIGRATION and SERVER_SHUTDOWN to unique reasons.
Map CONNECTION_TIMEOUT and SIP_TRUNK_FAILURE to `Failed`.
The only remaining livekit.DisconnectReason is UNKNOWN_REASON, which
makes sense as `OtherReason`.
@prlanzarin prlanzarin force-pushed the lkgosdk/fix/extra-discon-reasons branch from 0f5b92f to 3b14460 Compare May 1, 2025 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant