Skip to content

Make ClientTransport extend Closeable#1071

Merged
mtdowling merged 2 commits intomainfrom
closeable-transport
Mar 13, 2026
Merged

Make ClientTransport extend Closeable#1071
mtdowling merged 2 commits intomainfrom
closeable-transport

Conversation

@mtdowling
Copy link
Member

ClientTransport now extends Closeable with a default no-op close() implementation. This allows transports that manage resources (connection pools, HTTP clients, etc.) to be properly closed when no longer needed, without breaking existing implementations.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

ClientTransport now extends Closeable with a default no-op close()
implementation. This allows transports that manage resources (connection
pools, HTTP clients, etc.) to be properly closed when no longer needed,
without breaking existing implementations.
Client.close() delegates to the transport's close() method, enabling
try-with-resources usage and proper cleanup of transport resources
like connection pools.
@mtdowling mtdowling enabled auto-merge (rebase) March 13, 2026 19:29
@mtdowling mtdowling merged commit e84a3a4 into main Mar 13, 2026
4 checks passed
@mtdowling mtdowling deleted the closeable-transport branch March 13, 2026 19:43
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.

2 participants