Skip to content

Commit 0f663fd

Browse files
Fix reconnect logic to update lastBrowserResumeReconnectAt on each connection attempt
1 parent b28fb9a commit 0f663fd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎apps/web/src/environments/runtime/service.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1482,12 +1482,12 @@ function reconnectEnvironmentConnectionsAfterBrowserResume(reason: string): void
14821482
if (now - lastBrowserResumeReconnectAt < BROWSER_RESUME_RECONNECT_COOLDOWN_MS) {
14831483
return;
14841484
}
1485-
lastBrowserResumeReconnectAt = now;
14861485

14871486
for (const connection of environmentConnections.values()) {
14881487
if (connection.client.isHeartbeatFresh()) {
14891488
continue;
14901489
}
1490+
lastBrowserResumeReconnectAt = now;
14911491
void connection.reconnect().catch((error) => {
14921492
console.warn("Environment reconnect after browser resume failed", {
14931493
environmentId: connection.environmentId,

0 commit comments

Comments
 (0)