Skip to content

🐛 Fix #inspect output when SSLSocket#connect fails - #764

Merged
nevans merged 2 commits into
masterfrom
fix-tls-not-established-inspect
Sep 9, 2026
Merged

🐛 Fix #inspect output when SSLSocket#connect fails#764
nevans merged 2 commits into
masterfrom
fix-tls-not-established-inspect

Conversation

@nevans

@nevans nevans commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Because this relied on checking for the presence of SSLSocket#session, #inspect would return "TLS (NOT VERIFIED)" (which is technically correct) when "TLS (NOT ESTABLISHED)" was expected.

This updates the tests to check the inspect output more thoroughly, and uses a simple boolean ivar to track when ssl_socket_connect succeeds.

This identified a minor `#inspect` bug when TLS fails to connect (or
after the connection has disconnected).
The TLS socket's session is not necessarily `nil` in this scenario.
Since `connect` failed, `#inspect` should report "NOT ESTABLISHED".
@nevans nevans added the bug Something isn't working label Sep 9, 2026
@nevans
nevans added this pull request to stack #766 September 9, 2026 16:59
@nevans
nevans merged commit 6fe0796 into master Sep 9, 2026
34 checks passed
@nevans
nevans deleted the fix-tls-not-established-inspect branch September 9, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant