Skip to content

fix: stop SSE parsing at [DONE] - #447

Merged
edward-ly merged 1 commit into
nextcloud:mainfrom
mikemikimike:fix/stream-done-446
Oct 26, 2026
Merged

edward-ly merged 1 commit into
nextcloud:mainfrom
mikemikimike:fix/stream-done-446

Conversation

@mikemikimike

Copy link
Copy Markdown
Contributor

Summary

  • Stop reading an SSE response after its [DONE] event and close the response stream on completion or failure.
  • Keep the existing EOF flush behavior and cover keep-alive completion, final usage, malformed events, and generator teardown.

Validation

  • Focused PHPUnit regression tests: 4 tests, 21 assertions.
  • PHP syntax check: 87 files.

Fixes #446
#446

Signed-off-by: mikemikimike <13286568797@163.com>

@edward-ly edward-ly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks so much!

@edward-ly
edward-ly force-pushed the fix/stream-done-446 branch from cbcd54b to 10c9c34 Compare October 26, 2026 21:02
@edward-ly
edward-ly merged commit a070930 into nextcloud:main Oct 26, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

parseStreamChatResponse ignores the [DONE] sentinel and hangs until read timeout on keep-alive servers

2 participants