Modify the conditions for successful execution of SSLSocket_setSocketForSSL()

This commit is contained in:
Zhao Yang 2025-12-25 20:26:24 +08:00 committed by Ian Craggs
parent c810e77b2a
commit ddecef390c
No known key found for this signature in database
GPG Key ID: A7AE1A8F2CCAB186
2 changed files with 2 additions and 2 deletions

View File

@ -2990,7 +2990,7 @@ static int MQTTAsync_connecting(MQTTAsyncs* m)
setSocketForSSLrc = SSLSocket_setSocketForSSL(&m->c->net, m->c->sslopts,
serverURI, hostname_len);
if (setSocketForSSLrc != MQTTASYNC_SUCCESS)
if (setSocketForSSLrc == 1)
{
if (m->c->session != NULL)
if ((rc = SSL_set_session(m->c->net.ssl, m->c->session)) != 1)

View File

@ -1313,7 +1313,7 @@ static MQTTResponse MQTTClient_connectURIVersion(MQTTClient handle, MQTTClient_c
setSocketForSSLrc = SSLSocket_setSocketForSSL(&m->c->net, m->c->sslopts,
serverURI, hostname_len);
if (setSocketForSSLrc != MQTTCLIENT_SUCCESS)
if (setSocketForSSLrc == 1)
{
if (m->c->session != NULL)
if ((rc = SSL_set_session(m->c->net.ssl, m->c->session)) != 1)