diff --git a/ChangeLog.txt b/ChangeLog.txt index bbbef2cb..17281c04 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -6,6 +6,7 @@ Broker: Client library: - Inflight limits should only apply to outgoing messages. Closes #461620. +- Fix reconnect bug on Windows. Closes #463000. 1.4 - 20150218 diff --git a/lib/mosquitto.c b/lib/mosquitto.c index 66fd3600..b5cf5dd1 100644 --- a/lib/mosquitto.c +++ b/lib/mosquitto.c @@ -931,7 +931,7 @@ int mosquitto_loop(struct mosquitto *mosq, int timeout, int max_packets) } } } - if(mosq->sockpairR >= 0 && FD_ISSET(mosq->sockpairR, &readfds)){ + if(mosq->sockpairR != INVALID_SOCKET && FD_ISSET(mosq->sockpairR, &readfds)){ #ifndef WIN32 if(read(mosq->sockpairR, &pairbuf, 1) == 0){ }