mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-09-20 06:47:45 +08:00
Possible fix for #1385.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user