response timeout to avoid termination

This commit is contained in:
被遗忘的记忆
2024-09-09 09:52:07 +08:00
committed by GitHub
parent 95a31d1521
commit 8ae0a8d691
+3 -2
View File
@@ -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);