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

Add Heartbeat to websocket connection between Frontend and SignallingServer #34

Open
2 of 6 tasks
rotor-antoine opened this issue Mar 19, 2024 · 2 comments
Open
2 of 6 tasks
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed never-stale
Milestone

Comments

@rotor-antoine
Copy link

rotor-antoine commented Mar 19, 2024

Component your feature request relates to

  • Signalling server
  • Frontend library
  • Frontend UI library
  • Matchmaker
  • SFU
  • This repo

Problem your feature solves? Please describe.
The Frontend Library is not triggering disconnection event when I for instance turn off the wifi of my laptop (which is running the frontend).
Same issue on the Signalling Server. Those kind of "disconnection" wouldn't trigger an event that could be handle by the signalling server .
I know that this repo is not supposed to be necessarily "production ready" but this issue could almost be considered a "bug" as the signalling server will never recover (ie it will never be availalble for a new user) when this type of disconnection with the frontend happen.

Describe the solution you'd like
It seems like a hearbeat check (regular ping messages) both from frontend and from the signalling server, would be able to detect those disconnections:
https://github.com/websockets/ws?tab=readme-ov-file#how-to-detect-and-close-broken-connections

Additional context
Add any other context or screenshots about the feature request here.

@rotor-antoine rotor-antoine added the enhancement New feature or request label Mar 19, 2024
@lukehb lukehb added good first issue Good for newcomers help wanted Extra attention is needed labels Mar 21, 2024
@lukehb lukehb added this to the 5.5 milestone Mar 21, 2024
@lukehb
Copy link
Contributor

lukehb commented Mar 21, 2024

This is a good idea.

I think this is a reasonable suggestion to include in our 5.5 release for the signaling server.

@marospekarik
Copy link

This would also fix my problem with cloudfare terminating inactive ws connections after 90s. +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed never-stale
Projects
None yet
Development

No branches or pull requests

4 participants