kb-server 0.0.1-beta.30 → 0.0.1-beta.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -78,8 +78,8 @@ const packSSE = (sseHandlers, options) => {
|
|
|
78
78
|
// 完成响应
|
|
79
79
|
took = Date.now() - start;
|
|
80
80
|
logger_1.logger.log("info", `耗时:${took} ms - RequestId: ${requestId}`);
|
|
81
|
-
//
|
|
82
|
-
await (0, sleep_1.sleep)(
|
|
81
|
+
// 清空事件循环再关闭连接
|
|
82
|
+
await (0, sleep_1.sleep)(0);
|
|
83
83
|
return res.end();
|
|
84
84
|
}
|
|
85
85
|
catch (rawError) {
|
|
@@ -113,8 +113,8 @@ const packSSE = (sseHandlers, options) => {
|
|
|
113
113
|
logger_1.logger.log("info", `发送消息:\n${response}`);
|
|
114
114
|
logger_1.logger.log("info", `耗时:${took} ms - RequestId: ${requestId}`);
|
|
115
115
|
res.write(response);
|
|
116
|
-
//
|
|
117
|
-
await (0, sleep_1.sleep)(
|
|
116
|
+
// 清空事件循环再关闭连接
|
|
117
|
+
await (0, sleep_1.sleep)(0);
|
|
118
118
|
return res.end();
|
|
119
119
|
}
|
|
120
120
|
};
|