Possible fix for #1385.

This commit is contained in:
Roger A. Light
2019-09-11 17:35:50 +01:00
parent 5941291bd5
commit 808bbedb6a
-6
View File
@@ -214,9 +214,6 @@ static int mosquitto__reconnect(struct mosquitto *mosq, bool blocking, const mos
}else
#endif
{
pthread_mutex_lock(&mosq->state_mutex);
mosq->state = mosq_cs_connecting;
pthread_mutex_unlock(&mosq->state_mutex);
rc = net__socket_connect(mosq, mosq->host, mosq->port, mosq->bind_address, blocking);
}
if(rc>0){
@@ -233,9 +230,6 @@ static int mosquitto__reconnect(struct mosquitto *mosq, bool blocking, const mos
if(rc){
packet__cleanup_all(mosq);
net__socket_close(mosq);
pthread_mutex_lock(&mosq->state_mutex);
mosq->state = mosq_cs_new;
pthread_mutex_unlock(&mosq->state_mutex);
}
return rc;
}