kb-server 0.0.1-beta.29 → 0.0.1-beta.30
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,6 +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
|
+
// 延迟1ms关闭连接
|
|
82
|
+
await (0, sleep_1.sleep)(1);
|
|
81
83
|
return res.end();
|
|
82
84
|
}
|
|
83
85
|
catch (rawError) {
|
|
@@ -110,8 +112,8 @@ const packSSE = (sseHandlers, options) => {
|
|
|
110
112
|
took = Date.now() - start;
|
|
111
113
|
logger_1.logger.log("info", `发送消息:\n${response}`);
|
|
112
114
|
logger_1.logger.log("info", `耗时:${took} ms - RequestId: ${requestId}`);
|
|
113
|
-
// 延迟1ms关闭连接
|
|
114
115
|
res.write(response);
|
|
116
|
+
// 延迟1ms关闭连接
|
|
115
117
|
await (0, sleep_1.sleep)(1);
|
|
116
118
|
return res.end();
|
|
117
119
|
}
|