Skip to content

Ping the signaling server from the client #191

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

Merged
merged 2 commits into from
Feb 5, 2025
Merged

Conversation

erikdubbelboer
Copy link
Member

Send pings to be able to detect broken connections. No need for a pong, TCP will take care of that.

Log the origin with "unknown packet type received" so we can see which clients are sending packets the server doesn't support (in this case it was ping from old clients?).

Fixes #183

Send pings to be able to detect broken connections. No need for a pong,
TCP will take care of that.

Log the origin with "unknown packet type received" so we can see which
clients are sending packets the server doesn't support (in this case it
was ping from old clients?).
Copy link
Collaborator

@koenbollen koenbollen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would maybe also reply a pong. With just sending a ping, there is a chance a load-balancer accepts the ping, but it never reaches the server.

That, or remove the "pong" case in the server.

@erikdubbelboer
Copy link
Member Author

That's not how loadbalancing works for a WebSocket. It either gets delivered or the loadbalancer kills the connection and the next ping will catch it.

@erikdubbelboer erikdubbelboer enabled auto-merge (squash) February 5, 2025 10:01
@erikdubbelboer erikdubbelboer merged commit 70f03b6 into main Feb 5, 2025
6 checks passed
@erikdubbelboer erikdubbelboer deleted the client-ping branch February 5, 2025 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Request: send ping from client to server every 5-10 seconds
4 participants