From d7b88cfabd857b731b9db25388019bb8769d3b0e Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 18 May 2016 01:07:50 +0200 Subject: [PATCH] Sync byte timeout fixes. --- src/output/output.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/output/output.cpp b/src/output/output.cpp index d75da215..1313bf25 100644 --- a/src/output/output.cpp +++ b/src/output/output.cpp @@ -150,9 +150,10 @@ namespace Mist { //sync byte 0 = no sync yet, wait for sync from controller... IPC::statExchange tmpEx(statsPage.getData()); unsigned int i = 0; - while (!tmpEx.getSync() && i < 30){ - Util::sleep(100); + while (!tmpEx.getSync() && i++ < 30){ + Util::wait(100); stats(); + tmpEx = IPC::statExchange(statsPage.getData()); } HIGH_MSG("USER_NEW sync achieved: %u", (unsigned int)tmpEx.getSync()); //1 = check requested (connection is new)