修复异常场景,请求链接无法关闭问题

This commit is contained in:
zhang
2026-02-09 14:58:46 +08:00
parent c78b456dbf
commit 4a36aaa780

View File

@@ -98,6 +98,8 @@ public abstract class AbstractStreamingChatService implements IChatService {
}
} catch (Exception e) {
SseMessageUtils.sendMessage(userId, "对话出错:" + e.getMessage());
SseMessageUtils.completeConnection(userId, tokenValue);
log.error("{}请求失败:{}", getProviderName(), e.getMessage(), e);
}
return emitter;