fix(imessage): unify timeout configuration with configurable probeTimeoutMs

- Add probeTimeoutMs config option to channels.imessage
- Export DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS constant (10s) from probe.ts
- Propagate timeout config through all iMessage probe/RPC operations
- Fix hardcoded 2000ms timeouts that were too short for SSH connections

Closes: timeout issues when using SSH wrapper scripts (imsg-ssh)
This commit is contained in:
Yudong Han
2026-02-04 07:58:46 +00:00
committed by Peter Steinberger
parent 78fd194722
commit 78f8a29071
4 changed files with 20 additions and 7 deletions

View File

@@ -149,6 +149,7 @@ export class IMessageRpcClient {
params: params ?? {},
};
const line = `${JSON.stringify(payload)}\n`;
// Default timeout matches DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS from probe.ts
const timeoutMs = opts?.timeoutMs ?? 10_000;
const response = new Promise<T>((resolve, reject) => {