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

feat: send periodic pings for keep alives #103

Merged
merged 2 commits into from
Jun 8, 2024
Merged

Conversation

obmarg
Copy link
Owner

@obmarg obmarg commented Jun 8, 2024

#93 & #94 added a notion of keep alives to graphql-ws-client. But the implementation caused the connection to drop whenever no messages were received for the specified period. This isn't how I'd usually expect a keep alive to work though - I'd usually expect it to send pings during inactive periods, and only drop the connection if a few of those pings were not replied to.

This PR implements that behaviour instead. It's a slightly breaking change over the earlier implementation, but that was not yet released so that seems fine.

@obmarg obmarg marked this pull request as ready for review June 8, 2024 12:29
@obmarg obmarg merged commit 7259683 into main Jun 8, 2024
2 checks passed
@obmarg obmarg deleted the obmarg/push-lvntynuvpkkm branch June 8, 2024 12:29
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.

None yet

1 participant