Skip to content

Commit 180dc9a

Browse files
TheSentinel454Elrondclaude
committed
chore(desktop): keep relayClientSession.ts under the file-size cap
Move the liveness rationale onto RelayStallWatchdog.recordInbound. Co-authored-by: Elrond <28d6302a099e5225b02c4155ac4236e4912603df2ab08dbfc2f4fef08ce598c8@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Luke Tornquist <[email protected]>
1 parent e9b27c5 commit 180dc9a

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎desktop/src/shared/api/relayClientSession.ts‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -877,10 +877,6 @@ export class RelayClient {
877877
this.resetConnection(new Error("Relay connection errored."));
878878
return;
879879
}
880-
// Only frames the peer sent count as liveness (Text, Binary, Ping, Pong).
881-
// Close and Error are the native layer's terminal notices, delivered
882-
// whenever it noticed the socket was gone, so they must not refresh the
883-
// idle clock that bounds `liveUntil`.
884880
this.stallWatchdog.recordInbound();
885881

886882
const payload = getTextPayload(message);

‎desktop/src/shared/api/relayStallWatchdog.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,12 @@ export class RelayStallWatchdog {
6161
return this.lastInboundAt;
6262
}
6363

64-
/** Record any inbound WS frame as proof the socket is still alive. */
64+
/**
65+
* Record an inbound WS frame as proof the socket is still alive. Callers
66+
* pass only frames the peer sent (Text, Binary, Ping, Pong): the native
67+
* layer's Close/Error notices say when it noticed the socket was gone, not
68+
* when it last worked, and the timestamp bounds the resume cursor.
69+
*/
6570
recordInbound(): void {
6671
if (this.intervalHandle === null) {
6772
return;

0 commit comments

Comments
 (0)