fix: Handle scanner errors in OpenAI relay stream handler

This commit is contained in:
1808837298@qq.com
2025-03-04 17:10:56 +08:00
parent b1be64bcf3
commit b00dd8b405

View File

@@ -156,6 +156,11 @@ func OaiStreamHandler(c *gin.Context, resp *http.Response, info *relaycommon.Rel
}
mu.Unlock()
}
if err := scanner.Err(); err != nil {
common.LogError(c, "scanner error: "+err.Error())
}
common.SafeSendBool(stopChan, true)
})