Increase chat send RPC timeout to 120s for high-latency networks (#311)

This commit is contained in:
paisley
2026-03-05 15:49:36 +08:00
committed by GitHub
Unverified
parent c5058908af
commit 0901d9912a
2 changed files with 6 additions and 2 deletions

View File

@@ -612,8 +612,8 @@ function registerGatewayHandlers(
logger.info(`[chat:sendWithMedia] Sending: message="${message.substring(0, 100)}", attachments=${imageAttachments.length}, fileRefs=${fileReferences.length}`);
// Use a longer timeout when images are present (120s vs default 30s)
const timeoutMs = imageAttachments.length > 0 ? 120000 : 30000;
// Longer timeout for chat sends to tolerate high-latency networks (avoids connect error)
const timeoutMs = 120000;
const result = await gatewayManager.rpc('chat.send', rpcParams, timeoutMs);
logger.info(`[chat:sendWithMedia] RPC result: ${JSON.stringify(result)}`);
return { success: true, result };