feat: iOS TLS fix — defer startTLS until didConnectToHost#217
feat: iOS TLS fix — defer startTLS until didConnectToHost#217manoaxcend wants to merge 6 commits into
Conversation
|
@Rapsssito , This PR fixes an issue where startTLS: is not called if the connection is established asynchronously in iOS, leading to silent TLS handshake failures. Problem
Fix
Tested On
|
|
interesting maybe it will fix one of my issue, I will test it |
There was a problem hiding this comment.
Pull request overview
This PR adjusts the iOS client TLS startup sequence so TLS is initiated only after the underlying TCP connection is established (didConnectToHost), aligning startTLS timing with GCDAsyncSocket’s expected lifecycle.
Changes:
- Defers client-side
startTLSby storing provided TLS options duringconnectand applying them insocket:didConnectToHost:port:. - Introduces
_tlsOptionsPendingto hold TLS configuration until the TCP connect callback fires.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
No description provided.