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

Added RPC command to disable keepalive messages for a client; #291 #303

Merged
merged 3 commits into from
Dec 30, 2023

Conversation

Xemdo
Copy link
Contributor

@Xemdo Xemdo commented Dec 29, 2023

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Problem/Feature

Resolves #291 by adding the requested feature

Description of Changes:

  • Added command twitch event websocket keepalive --session=<Session ID> --enabled=<true/false>
  • Added --enabled flag for this command and future feature toggling

Checklist

  • My code follows the Contribution Guide
  • I have self-reviewed the changes being requested
  • I have made comments on pieces of code that may be difficult to understand for other editors
  • I have updated the documentation (if applicable)

@Xemdo
Copy link
Contributor Author

Xemdo commented Dec 29, 2023

Running server in debug:

2023/12/29 00:44:11 Client connected [b5289805]
2023/12/29 00:44:11 [4d90be39] Connections: (1) [ b5289805 ]
2023/12/29 00:44:16 Sent pong to client [b5289805]
2023/12/29 00:44:21 Sent pong to client [b5289805]
2023/12/29 00:44:21 Sent session_keepalive to client [b5289805]
2023/12/29 00:44:26 Sent pong to client [b5289805]
2023/12/29 00:44:31 Sent pong to client [b5289805]
2023/12/29 00:44:31 Sent session_keepalive to client [b5289805]
2023/12/29 00:44:33 RPC set status on client feature [KeepAliveEnabled] for client [b5289805]: false
2023/12/29 00:44:36 Sent pong to client [b5289805]
2023/12/29 00:44:41 Skipped sending session_keepalive to client [b5289805]
2023/12/29 00:44:41 Sent pong to client [b5289805]
2023/12/29 00:44:46 Sent pong to client [b5289805]
2023/12/29 00:44:51 Skipped sending session_keepalive to client [b5289805]
2023/12/29 00:44:51 Sent pong to client [b5289805]
2023/12/29 00:44:56 Sent pong to client [b5289805]
2023/12/29 00:45:01 Skipped sending session_keepalive to client [b5289805]
2023/12/29 00:45:01 Sent pong to client [b5289805]
2023/12/29 00:45:06 Sent pong to client [b5289805]
2023/12/29 00:45:09 RPC set status on client feature [KeepAliveEnabled] for client [b5289805]: true
2023/12/29 00:45:11 Sent pong to client [b5289805]
2023/12/29 00:45:11 Sent session_keepalive to client [b5289805]

Without --debug flag, "RPC set status on [...]" line will still appear, but "Skipped sending session_keepalive to client [...]" line only appears when using debug flag.

@SputNikPlop
Copy link
Contributor

tested and LGTM

@Xemdo Xemdo merged commit 468b0e7 into main Dec 30, 2023
8 checks passed
@Xemdo Xemdo deleted the feature_291 branch December 30, 2023 23:48
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.

Simulate Keepalive Message Interruption [Feature Request]
2 participants