Skip to content

fix(transport): close connection after failed TLS handshake - #371

Merged
emiago merged 1 commit into
emiago:mainfrom
yash-garg:patch-1
Oct 1, 2026
Merged

emiago merged 1 commit into
emiago:mainfrom
yash-garg:patch-1

Conversation

@yash-garg

Copy link
Copy Markdown
Contributor

TransportTLS.CreateConnection returns on a failed TLS handshake without closing the underlying TCP connection. Because the connection has not yet been added to the transport pool, no later cleanup owns it, which can leak sockets after repeated handshake failures. Close the TCP connection before returning the original error.

@yash-garg

Copy link
Copy Markdown
Contributor Author

Could you please take a look at this small fix? @emiago TIA!

@emiago
emiago merged commit 171f26a into emiago:main Oct 1, 2026
@emiago

emiago commented Oct 1, 2026

Copy link
Copy Markdown
Owner

merged! Thanks for finding

@yash-garg
yash-garg deleted the patch-1 branch October 2, 2026 05:03
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