Skip to content

Inconsistent Firing of Disconnect Events Across Disconnection Paths #101

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
holofermes opened this issue Apr 11, 2025 · 0 comments · May be fixed by #102
Open

Inconsistent Firing of Disconnect Events Across Disconnection Paths #101

holofermes opened this issue Apr 11, 2025 · 0 comments · May be fixed by #102

Comments

@holofermes
Copy link
Contributor

Currently, the Disconnected event does not consistently fire across all disconnection paths. Specifically, when disconnection occurs through the DisconnectReceived callback, the event is not triggered at all.
Moreover the disconnect event should be fired with a DisconnectReason, currently it passes the room instead.

Proposed Solution:

  • Introduce a DisconnectDelegate that includes a DisconnectReason.
  • Update the Disconnected event to use this new delegate.
  • Ensure that the Disconnected event fires with a reason when disconnection occurs via the DisconnectReceived callback.

Looking at the enum for DisconnectReason I am not sure which one is the best in this case. I will make a PR using ClientInitiated, but this is arbitrary and can/should be revised as needed.

@holofermes holofermes linked a pull request Apr 11, 2025 that will close this issue
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 a pull request may close this issue.

1 participant