The default socket provider is returning a tls handshake failed error for any failures that occur during the TLS handshake, including connections that are lost during the handshake. This error translates to a fatal error that is reported to the user and the client app will use the max wait time (~1 hour) before attempting to reconnect to the server.
Update the default socket provider to only use the tls handshake failed error when that specific failure occurs and return a different error (e.g. going away) for the other connection/communication related errors.