fix: 解决Codex cli转发流式响应中断问题

This commit is contained in:
shaw
2025-08-11 14:40:02 +08:00
parent 31f6139699
commit 4643bd8aad

View File

@@ -237,7 +237,7 @@ router.post('/responses', authenticateApiKey, async (req, res) => {
const chunkStr = chunk.toString()
// 转发数据给客户端
if (!res.headersSent) {
if (!res.destroyed) {
res.write(chunk)
}