From 8ae0a8d6914db6f4901d0c7c2e29488bebea4397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=AB=E9=81=97=E5=BF=98=E7=9A=84=E8=AE=B0=E5=BF=86?= <32097237+YIWANG-sketch@users.noreply.github.com> Date: Mon, 9 Sep 2024 09:52:07 +0800 Subject: [PATCH] response timeout to avoid termination --- provider.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/provider.mjs b/provider.mjs index 222ac5d..f678ece 100644 --- a/provider.mjs +++ b/provider.mjs @@ -981,10 +981,11 @@ class YouProvider { responseTimeout = setTimeout(() => { if (!responseStarted) { - console.log("40秒内没有收到响应,终止请求"); + console.log("50秒内没有收到响应,终止请求"); emitter.emit("warning", new Error("No response received within 40 seconds")); + emitter.emit("end", traceId); } - }, 40000); + }, 50000); // 初始执行 setupEventSource await setupEventSource(page, url, traceId, customEndMarker);