Skip to content

Commit 1dc841f

Browse files
committed
packages/client-runtime/connection/supervisor: say a connected replacement takes over at once
The silent-socket comment said the live socket keeps its remaining window to prove itself alive. A same-rank replacement takes over as soon as it connects, so only a frame that arrives before then keeps the socket.
1 parent 03a4561 commit 1dc841f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎packages/client-runtime/src/connection/supervisor.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -947,8 +947,8 @@ export const make = Effect.fn("EnvironmentSupervisor.make")(function* (
947947
yield* Effect.sleep(SILENT_SOCKET_RECHECK_EVERY);
948948
}
949949
if (!(yield* socketSilent)) return "alive" as const;
950-
// The host takes fresh requests, so a replacement can connect while the
951-
// socket keeps its remaining window to prove itself alive.
950+
// The host takes fresh requests, so a replacement starts connecting now.
951+
// It takes over as soon as it connects; a frame before then keeps the socket.
952952
yield* onHostAnswered;
953953
if (!answersQuickly(routeKind) && !longResume) {
954954
const silentFor = (yield* Clock.monotonicTimeNanos) - startedAt;

0 commit comments

Comments
 (0)