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

About when to send the leave event #95

Open
vincentfretin opened this issue Nov 1, 2021 · 0 comments
Open

About when to send the leave event #95

vincentfretin opened this issue Nov 1, 2021 · 0 comments

Comments

@vincentfretin
Copy link
Contributor

I see there is currently a todo comment there

janus-plugin-sfu/src/lib.rs

Lines 336 to 342 in ef815ec

// if this user is entirely disconnected, notify their roommates.
// todo: is it better if this is instead when their publisher disconnects?
if !switchboard.is_connected(&joined.user_id) {
let response = json!({ "event": "leave", "user_id": &joined.user_id, "room_id": &joined.room_id });
let occupants = switchboard.publishers_occupying(&joined.room_id);
notify_except(&response, &joined.user_id, occupants);
}

I had an issue with naf-janus-adapter master (see issue networked-aframe/naf-janus-adapter#21) where the js code can now triggers duplicate avatar on reconnect because of this part of the code I think because the users could possibly never receive the leave event. This is my hypothesis, I don't have proof that the leave event was not send when the issue occurred.

I currently don' plan to investigate this further, just wanted to document it. I currently reverted back to naf-janus-adapter 3.0.x in production.

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

No branches or pull requests

1 participant