Skip to content

Release the response entity when the client is gone before the write (#1774) - #1776

Merged
jlouvel merged 2 commits into
3.0from
fix/1774-release-entity-peer-gone
Nov 30, 2026
Merged

jlouvel merged 2 commits into
3.0from
fix/1774-release-entity-peer-gone

Conversation

@jlouvel

@jlouvel jlouvel commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator

Fixes #1774.

NettyServerCall.sendResponse threw "Connection closed by peer" before the try/finally that calls Representation.release(), so an entity wrapping another connection's stream was never closed. It is now released on that path, and also when the head wasn't written yet and the entity is dropped for a 500 response.

Adds NettyServerReleaseOnPeerGoneTestCase: the client disconnects while the handler waits, and the entity must be released.

🤖 Generated with Claude Code

jlouvel and others added 2 commits November 30, 2026 16:00
…1774)

NettyServerCall.sendResponse threw "Connection closed by peer" before the
try/finally that releases the entity, so a stream wrapped by the entity
was never closed. Release it on that path, and when the head wasn't
written yet and the entity is dropped for an error response.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@sonarqubecloud

Copy link
Copy Markdown

@jlouvel
jlouvel merged commit 1af54f5 into 3.0 Nov 30, 2026
3 checks passed
@jlouvel
jlouvel deleted the fix/1774-release-entity-peer-gone branch November 30, 2026 22:49
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.

1 participant