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

[1.x] user session hangs on browser tab closed #3396

Open
B-R-Bender opened this issue Jun 14, 2024 · 3 comments
Open

[1.x] user session hangs on browser tab closed #3396

B-R-Bender opened this issue Jun 14, 2024 · 3 comments
Labels
multistream Related to Janus 1.x needinfo

Comments

@B-R-Bender
Copy link
Contributor

B-R-Bender commented Jun 14, 2024

[email protected]

Have you tested a more recent version of Janus too?
Yes. I've tried to updated my dependency from "janus-gateway": "git:https://github.com/meetecho/janus-gateway.git", to "janus-gateway": "^1.2.3", but it behaves the same

Was this working before?
It's working with janus 0.x server and [email protected] for sure

Additional context
Hello guys!
I've noticed that after I've moved from janus legacy version to a new one my users sessions is not destroyed on tab/browser closed.
It keeps hanging on the server till it will be killed by timeout. I've tried to update my janus version on a client but no use. Is there any suggestion on how to fix this or anything I can try to look into? Also I've tried to google this issues but haven't found anything pretty much related, I'm wondering an I the only one experiencing such issue?

Thanks in advance.

@B-R-Bender B-R-Bender added the multistream Related to Janus 1.x label Jun 14, 2024
@lminiero
Copy link
Member

You need to provide more details. What plugin? What's the scenario?

@B-R-Bender
Copy link
Contributor Author

Hello Lorenzo.

Actually that's any janus plugin I'm using, video and audio room - for sure

The scenario is quite simple: let's say that when the page loads, I connect to the Janus server and join several audio rooms. If I close the tab, my handlers/session will not be destroyed, so if I open the same page again within a minute interval (default timeout) I will get a "User busy" response.

@atoppi
Copy link
Member

atoppi commented Jul 11, 2024

This has nothing to do with janus, intended as the server.
The concept is that the client should do its best to notify the server a teardown and if that does not happen (e.g. abrupt disconnection) then server timeout kicks in.

The session should be destroyed when closing a tab/client but that totally depends on:

  • the client implementation (e.g. janus.js)
  • the runtime (e.g. browser/os) running the code
  • the transport in use (WS? HTTP? etc)

For example janus.js will try to destroy the session on the browser beforeUnload event and that will in turn close the WebSocket or send a beacon if using long-poll.

You might want to check if those mechanisms are working in your environment and if some elements in the middle (proxies/LB) can interfere with those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multistream Related to Janus 1.x needinfo
Projects
None yet
Development

No branches or pull requests

3 participants