Skip to content

Add ping interval to constructor params for WebSocketServer #497

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 4 commits into from
Mar 12, 2024

Conversation

dwymark-celestron
Copy link
Contributor

I could not find any way to enable the ping heartbeat for all connections while configuring the WebSocketServer class. I added the parameter pingIntervalSeconds to the constructor to allow for this to be configured at construction time. Per my reading of the code and some local sanity checking, setting this parameter for all child connections enables the heartbeat feature.

If there was a better way for me to achieve this without the modification in this PR, please let me know and we can close. Otherwise, let me know if there are any further modifications you would like before we can merge this into master.

@bsergean
Copy link
Collaborator

CR passed, do you mind checking if the documentation should be updated ? (under the docs folder) ?

@dwymark-celestron
Copy link
Contributor Author

I added a paragraph to the usage documentation. I couldn't find anywhere else relevant worth updating. Let me know if you have any other requests to move this PR forward.

@bsergean bsergean merged commit 70602c4 into machinezone:master Mar 12, 2024
@bsergean
Copy link
Collaborator

Thanks ! Just merged your change.

@dwymark-celestron dwymark-celestron deleted the server-ping-interval branch March 12, 2024 16:47
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.

2 participants