mirror of https://github.com/eclipse/paho.mqtt.c
Modify the conditions for successful execution of SSLSocket_setSocketForSSL()
This commit is contained in:
parent
9f76932acf
commit
86b11bd556
|
|
@ -2932,7 +2932,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)
|
||||
|
|
|
|||
|
|
@ -1310,7 +1310,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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue