mirror of https://github.com/eclipse/paho.mqtt.c
To avoid a startup delay, don't increase cycle read timeout until some work is ready
This commit is contained in:
parent
f54f10ec10
commit
22690b8881
|
|
@ -1993,10 +1993,11 @@ thread_return_type WINAPI MQTTAsync_receiveThread(void* n)
|
|||
MQTTAsync_lock_mutex(mqttasync_mutex);
|
||||
if (MQTTAsync_tostop)
|
||||
break;
|
||||
timeout = 1000L;
|
||||
|
||||
if (sock == 0)
|
||||
continue;
|
||||
timeout = 1000L;
|
||||
|
||||
/* find client corresponding to socket */
|
||||
if (ListFindItem(MQTTAsync_handles, &sock, clientSockCompare) == NULL)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue