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] Optionally uses control frames for handling ping and pong #253

Merged
merged 7 commits into from
Oct 24, 2024

Conversation

joedixon
Copy link
Collaborator

This PR attempts to resolve #224

It's been reported that some of the Pusher clients don't support the pusher:ping|pong event format for handling pings and pongs and will, instead, rely on the low-level ping/pong control frames provided by the WebSocket specification.

This PR aims to address that by:

  • Defaulting to Pusher's pusher:ping|pong
  • Updating the last active timestamp on the connection when receiving a low-level ping control frame. The aim here is to prevent connections getting pruned by the PruneStaleConnections job
  • Set a boolean status on the connection of usesControlFrames when receiving a low-level ping control frame and, when this value is true, send low-level ping control frames when running the PingInactiveConnections job.

@joedixon joedixon marked this pull request as ready for review October 23, 2024 16:41
@joedixon
Copy link
Collaborator Author

Had some good feedback to this PR on #224 so bringing this out of draft.

@taylorotwell taylorotwell merged commit e67b30e into main Oct 24, 2024
9 checks passed
@taylorotwell taylorotwell deleted the fix/ping-pong branch October 24, 2024 15:00
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

Successfully merging this pull request may close these issues.

Potential Issue with Pusher Ping/Pong Messages
2 participants