Fix issue when SSL_connect() returns SSL_ERROR_WANT_READ. A call to SSL_write here will later transmit a new client hello and make ssl connection fail.
Signed-off-by: JonoJensen <jono.jensen@yahoo.se>
This commit is contained in:
parent
c4f8bee34c
commit
7d8d04bc39
@ -871,7 +871,11 @@ int _mosquitto_packet_write(struct mosquitto *mosq)
|
||||
}
|
||||
pthread_mutex_unlock(&mosq->out_packet_mutex);
|
||||
|
||||
#if defined(WITH_TLS) && !defined(WITH_BROKER)
|
||||
if((mosq->state == mosq_cs_connect_pending)||mosq->want_connect){
|
||||
#else
|
||||
if(mosq->state == mosq_cs_connect_pending){
|
||||
#endif
|
||||
pthread_mutex_unlock(&mosq->current_out_packet_mutex);
|
||||
return MOSQ_ERR_SUCCESS;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user