Skip to content

fix: close TCP socket on SSL connection failure#125

Merged
tsloughter merged 2 commits intoerleans:mainfrom
Taure:fix/ssl-socket-leak
Mar 16, 2026
Merged

fix: close TCP socket on SSL connection failure#125
tsloughter merged 2 commits intoerleans:mainfrom
Taure:fix/ssl-socket-leak

Conversation

@Taure
Copy link
Copy Markdown
Contributor

@Taure Taure commented Mar 16, 2026

Summary

  • Closes the underlying TCP socket when ssl:connect/3 fails in setup_ssl/2
  • Without this fix, the socket leaks when SSL negotiation fails after the server accepts the SSL request

Test plan

  • Verify with a PostgreSQL server configured to accept SSL requests but where ssl:connect fails (e.g., certificate mismatch)
  • Confirm no socket leak via inet:i() or OS-level socket monitoring

Taure added 2 commits March 16, 2026 17:27
Prevents socket leak when ssl:connect/3 fails by closing the
underlying TCP socket before returning the error.
@tsloughter tsloughter merged commit 5269deb into erleans:main Mar 16, 2026
4 checks passed
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