[PR #306] [MERGED] fix(stream):修复流被客户端关闭的时候的写入错误导致服务crash的问题 #331

Closed
opened 2026-02-27 07:18:59 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/justlovemaki/AIClient-2-API/pull/306
Author: @majie776
Created: 2/5/2026
Status: Merged
Merged: 2/5/2026
Merged by: @justlovemaki

Base: mainHead: main


📝 Commits (1)

  • 2816de1 fix(stream):修复流被客户端关闭的时候的写入错误导致服务crash的问题

📊 Changes

6 files changed (+292 additions, -77 deletions)

View changed files

📝 src/handlers/ollama-handler.js (+112 -42)
📝 src/plugins/api-potluck/middleware.js (+15 -2)
📝 src/ui-modules/event-broadcast.js (+18 -2)
📝 src/ui-modules/oauth-api.js (+20 -8)
📝 src/utils/common.js (+118 -19)
📝 src/utils/logger.js (+9 -4)

📄 Description

修复流被客户端关闭的时候的写入错误导致服务crash的问题


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/justlovemaki/AIClient-2-API/pull/306 **Author:** [@majie776](https://github.com/majie776) **Created:** 2/5/2026 **Status:** ✅ Merged **Merged:** 2/5/2026 **Merged by:** [@justlovemaki](https://github.com/justlovemaki) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`2816de1`](https://github.com/justlovemaki/AIClient-2-API/commit/2816de14511229e1b96d60748366dd1c0aff19cc) fix(stream):修复流被客户端关闭的时候的写入错误导致服务crash的问题 ### 📊 Changes **6 files changed** (+292 additions, -77 deletions) <details> <summary>View changed files</summary> 📝 `src/handlers/ollama-handler.js` (+112 -42) 📝 `src/plugins/api-potluck/middleware.js` (+15 -2) 📝 `src/ui-modules/event-broadcast.js` (+18 -2) 📝 `src/ui-modules/oauth-api.js` (+20 -8) 📝 `src/utils/common.js` (+118 -19) 📝 `src/utils/logger.js` (+9 -4) </details> ### 📄 Description 修复流被客户端关闭的时候的写入错误导致服务crash的问题 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 07:18:59 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/AIClient-2-API-justlovemaki#331
No description provided.