Skip to content
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

An erroneous Leave event is generated in Presence #25

Closed
Kuffs2205 opened this issue Mar 7, 2023 · 5 comments
Closed

An erroneous Leave event is generated in Presence #25

Kuffs2205 opened this issue Mar 7, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@Kuffs2205
Copy link

I'm not sure if this is an issue with Supabase, the client library or just me misunderstanding something but there appears to be an erroneous Leave event that is generated when I leave and rejoin a channel. I still appear to be connected even though I apparently left as broadcasts are still being sent and received normally.

The computer that "leaves" does not receive the Leave event but I'm assuming that is normal as it would not make much sense in normal operation.

I've uploaded a demo project to https://github.com/Kuffs2205/BroadcastTest and also a video showing the issue to https://github.com/Kuffs2205/BroadcastTest/blob/master/Presence.mp4

@Kuffs2205 Kuffs2205 added the bug Something isn't working label Mar 7, 2023
@acupofjose
Copy link
Contributor

acupofjose commented Mar 7, 2023

Very interesting! Yeah let me debug a bit - that doesn't seem to be working as intended. Thanks for providing a video and a MRE!

@Kuffs2205
Copy link
Author

Kuffs2205 commented Mar 8, 2023

I did the video because I'm way too much of an overexplainer.:)

I do get a stray Leave event occasionally on some clients but not all even without the disconnect/reconnect I describe above.

The disconnect scenario is just the one that I could reliably duplicate so that is probably the easiest to look for.

@acupofjose
Copy link
Contributor

Alright! You found a stray bug where Disconnect would be called and, if the channel instance still existed, would attempt to rejoin automatically instead of staying dead (I missed a flag). Should be fixed now in realtime-csharp@5.0.3. Could you verify for me?

You can see the same on https://multiplayer-csharp.azurewebsites.net if you open two browser windows (one regular, one incognito) with the debug consoles and mess around with clicking the "Connect"/"Disconnect" button on the bottom left.

@Kuffs2205
Copy link
Author

That seems good so far thank you. Happy to help squash the bugs.

@acupofjose
Copy link
Contributor

Good! I'll push it up to the next version of supabase-csharp then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants