|
|
@ -113,6 +113,8 @@ struct mosquitto *mosquitto_new(const char *id, bool clean_start, void *userdata
|
|
|
|
#ifdef WITH_THREADING
|
|
|
|
#ifdef WITH_THREADING
|
|
|
|
mosq->thread_id = pthread_self();
|
|
|
|
mosq->thread_id = pthread_self();
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
mosq->sockpairR = INVALID_SOCKET;
|
|
|
|
|
|
|
|
mosq->sockpairW = INVALID_SOCKET;
|
|
|
|
rc = mosquitto_reinitialise(mosq, id, clean_start, userdata);
|
|
|
|
rc = mosquitto_reinitialise(mosq, id, clean_start, userdata);
|
|
|
|
if(rc){
|
|
|
|
if(rc){
|
|
|
|
mosquitto_destroy(mosq);
|
|
|
|
mosquitto_destroy(mosq);
|
|
|
@ -123,10 +125,6 @@ struct mosquitto *mosquitto_new(const char *id, bool clean_start, void *userdata
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(net__socketpair(&mosq->sockpairR, &mosq->sockpairW)){
|
|
|
|
|
|
|
|
log__printf(mosq, MOSQ_LOG_WARNING,
|
|
|
|
|
|
|
|
"Warning: Unable to open socket pair, outgoing publish commands may be delayed.");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
errno = ENOMEM;
|
|
|
|
errno = ENOMEM;
|
|
|
|
}
|
|
|
|
}
|
|
|
|