Skip to content

TransportChannel#sendResponse has inconsistent release behaviour #78533

@DaveCTurner

Description

@DaveCTurner

TcpTransportChannel#sendResponse ends up calling TransportResponse#decRef once the response is sent, but the other implementations (notably DirectResponseChannel#sendResponse) do not. I don't have evidence that this is observable as a bug today but I expect it will bite us at some point in the future.

I'd rather we didn't have methods that implicitly called decRef like that, it's so much trappier than having every incRef/decRef pair explicitly co-located, so I'd prefer to add an on-sent listener argument to TransportChannel#sendResponse.

Relates #76474

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions