Fix calls to mosquitto_connect*_async() not completing.

This commit is contained in:
Roger A. Light 2015-04-29 10:13:55 +01:00
parent 11d0d887f0
commit 8de6b92e3c
3 changed files with 3 additions and 2 deletions

View File

@ -18,6 +18,7 @@ Client library:
- Fix possibility of select() being called with a socket that is >FD_SETSIZE.
This is a fix for #464632 that will be followed up by removing the select()
call in a future version.
- Fix calls to mosquitto_connect*_async() not completing.
1.4.1 - 20150403

View File

@ -745,7 +745,7 @@ int client_connect(struct mosquitto *mosq, struct mosq_config *cfg)
#else
rc = mosquitto_connect_bind(mosq, cfg->host, cfg->port, cfg->keepalive, cfg->bind_address);
#endif
if(rc){
if(rc>0){
if(!cfg->quiet){
if(rc == MOSQ_ERR_ERRNO){
#ifndef WIN32

View File

@ -517,7 +517,7 @@ static int _mosquitto_reconnect(struct mosquitto *mosq, bool blocking)
{
rc = _mosquitto_socket_connect(mosq, mosq->host, mosq->port, mosq->bind_address, blocking);
}
if(rc){
if(rc>0){
return rc;
}