Skip to content

Conversation

@realityone
Copy link
Contributor

No description provided.

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Sep 26, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 20, 2025
zhoujiahui and others added 3 commits October 29, 2025 14:26
In bidirectional streaming (HTTP/2, WebSocket), OnFinish callbacks should
only execute when both request and response bodies are closed, not when
each body closes individually.

Changes:
- Add body tracking to MetaStreamContext with atomic counters
- Register each wrapped body and track closure count
- Execute OnFinish only when all registered bodies are closed
- Skip wrapping WebSocket request bodies (data flows through response body)
- Remove unused Index field from MetaStreamChunk

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Simplify OnFinish callback signature by removing unused tag parameter
- Add Err field to MetaStreamChunk for error propagation in stream hooks
- Fix resource leak by deferring request body close in stream endpoints

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
http.ErrAbortHandler is a sentinel error used by httputil.ReverseProxy to signal intentional connection termination. Previously, this was caught by the panic handler and treated as an error, returning 502. Now it's properly recognized and silently handled.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@dosubot dosubot bot removed the size:XL This PR changes 500-999 lines, ignoring generated files. label Nov 10, 2025
@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Nov 10, 2025
@realityone realityone merged commit a976d44 into main Nov 17, 2025
5 of 12 checks passed
@realityone realityone deleted the stream-endpoint branch November 17, 2025 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants