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
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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