add inactivity timeout on client disconnect#3
Merged
Conversation
pirate
requested changes
May 20, 2026
Member
pirate
left a comment
There was a problem hiding this comment.
needs 1:1 updates in all the other languages
pirate
reviewed
May 20, 2026
| this._stopHeartbeat(); | ||
| if (this.server?.server_close_browser_on_downstream_disconnect !== true) return; | ||
| const interval_ms = this.client.client_heartbeat_interval_ms; | ||
| this.heartbeat_timer = setInterval(() => { |
Member
There was a problem hiding this comment.
if there's jitter or a lag spike this will stack a bunch of pings and make it worse, we may want to debounce this eventually but it's ok for now.
pirate
reviewed
May 20, 2026
| const interval_ms = this.client.client_heartbeat_interval_ms; | ||
| this.heartbeat_timer = setInterval(() => { | ||
| if (this.ext_session_id) { | ||
| void this._sendRaw( |
Member
There was a problem hiding this comment.
why use the untyped api?
Suggested change
| void this._sendRaw( | |
| void this.Mod.ping( |
pirate
reviewed
May 20, 2026
Comment on lines
+104
to
+106
| function downstreamClientKey(_cdpSessionId: string | null) { | ||
| return DOWNSTREAM_CLIENT_KEY; | ||
| } |
Member
There was a problem hiding this comment.
Suggested change
| function downstreamClientKey(_cdpSessionId: string | null) { | |
| return DOWNSTREAM_CLIENT_KEY; | |
| } |
Unnecessary getter, just use DOWNSTREAM_CLIENT_KEY, but also why is DOWNSTREAM_CLIENT_KEY as a constant needed at all? shouldnt we just use a uuid or session id per client or something?
pirate
approved these changes
May 20, 2026
Member
pirate
left a comment
There was a problem hiding this comment.
approved for now assuming you tested it in all langs and it works, but see my comments for follow-up improvements
pirate
approved these changes
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.