Commit 6c7112b2 authored by Ian Craggs's avatar Ian Craggs

Stop processCommand high CPU use

Bug: 442400
parent e3e40d17
......@@ -1260,7 +1260,12 @@ thread_return_type WINAPI MQTTAsync_sendThread(void* n)
int rc;
while (commands->count > 0)
{
int before = commands->count;
MQTTAsync_processCommand();
if (before == commands->count)
break; /* no commands were processed, so go into a wait */
}
#if !defined(WIN32) && !defined(WIN64)
rc = Thread_wait_cond(send_cond, 1);
if ((rc = Thread_wait_cond(send_cond, 1)) != 0 && rc != ETIMEDOUT)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment