Update files

This commit is contained in:
Mohamed Boudra
2026-01-24 21:26:43 +07:00
parent 56399bcb42
commit 22d48ea312
@@ -2175,12 +2175,15 @@ export class DaemonClientV2 {
} }
} }
// Capture stack trace at call site, not inside setTimeout
const timeoutError = new Error(`Timeout waiting for message (${timeout}ms)`);
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const timeoutHandle = const timeoutHandle =
timeout > 0 timeout > 0
? setTimeout(() => { ? setTimeout(() => {
this.waiters.delete(waiter); this.waiters.delete(waiter);
reject(new Error(`Timeout waiting for message (${timeout}ms)`)); reject(timeoutError);
}, timeout) }, timeout)
: null; : null;