Skip to content

Commit 82a0f42

Browse files
committed
fix: tighten handshake ready timing
1 parent 9eaa9a2 commit 82a0f42

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

src/agents/model-fallback.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,6 @@ function sameModelCandidate(a: ModelCandidate, b: ModelCandidate): boolean {
321321
return a.provider === b.provider && a.model === b.model;
322322
}
323323

324-
const DEFAULT_MODEL_HEALTH_COOLDOWN_MS = 30 * 60 * 1000;
325-
326324
function resolveModelHealthKey(provider: string, model: string): string {
327325
return modelKey(provider, model);
328326
}

src/gateway/server/ws-connection/message-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1463,7 +1463,6 @@ export function attachGatewayWsMessageHandler(params: GatewayWsMessageHandlerPar
14631463
);
14641464
}
14651465

1466-
setHandshakePhase("ready");
14671466
if (presenceKey) {
14681467
upsertPresence(presenceKey, {
14691468
host: connectParams.client.displayName ?? connectParams.client.id ?? os.hostname(),
@@ -1588,6 +1587,7 @@ export function attachGatewayWsMessageHandler(params: GatewayWsMessageHandlerPar
15881587
close();
15891588
return;
15901589
}
1590+
setHandshakePhase("ready");
15911591
if (authMethod === "bootstrap-token" && bootstrapTokenCandidate && device) {
15921592
try {
15931593
if (handoffBootstrapProfile) {

0 commit comments

Comments
 (0)