Skip to content

Commit 0f94919

Browse files
committed
fix: restore snapshot request timeout
1 parent 7400701 commit 0f94919

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/daemon-client.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ type EnsuredDaemon = {
117117
type ResolvedDaemonTransport = 'socket' | 'http';
118118

119119
const REQUEST_TIMEOUT_MS = 90_000;
120-
const SNAPSHOT_REQUEST_TIMEOUT_MS = 30_000;
121120
const PREPARE_REQUEST_TIMEOUT_MS = 240_000;
122121
const DAEMON_STARTUP_TIMEOUT_MS = 15_000;
123122
const DAEMON_STARTUP_ATTEMPTS = 2;
@@ -204,7 +203,7 @@ export function resolveDaemonRequestTimeoutMs(
204203
return req.flags.timeoutMs;
205204
}
206205
if (req.command === PUBLIC_COMMANDS.prepare) return PREPARE_REQUEST_TIMEOUT_MS;
207-
if (req.command === PUBLIC_COMMANDS.snapshot) return SNAPSHOT_REQUEST_TIMEOUT_MS;
206+
if (req.command === PUBLIC_COMMANDS.snapshot) return REQUEST_TIMEOUT_MS;
208207
return REQUEST_TIMEOUT_MS;
209208
}
210209

src/utils/__tests__/daemon-client.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,15 @@ test('snapshot request timeout preserves daemon metadata for follow-up evidence
182182
assert.equal(shouldResetDaemonAfterRequestTimeout(undefined), true);
183183
});
184184

185-
test('snapshot uses a shorter daemon request timeout with an explicit override', () => {
185+
test('snapshot uses the standard daemon request timeout with an explicit override', () => {
186186
const base = {
187187
session: 'default',
188188
positionals: [],
189189
flags: {},
190190
meta: {},
191191
};
192192

193-
assert.equal(resolveDaemonRequestTimeoutMs({ ...base, command: 'snapshot' }), 30_000);
193+
assert.equal(resolveDaemonRequestTimeoutMs({ ...base, command: 'snapshot' }), 90_000);
194194
assert.equal(
195195
resolveDaemonRequestTimeoutMs({
196196
...base,

0 commit comments

Comments
 (0)