Fixed 100% CPU issue in DTSC pull input

This commit is contained in:
Thulinma 2016-08-30 17:59:57 +02:00
parent eb5cdb32b1
commit d50404a00c

View file

@ -100,6 +100,7 @@ namespace Mist {
std::string toRec = srcConn.Received().copy(8);
unsigned long rSize = Bit::btohl(toRec.c_str() + 4);
if (!srcConn.Received().available(8 + rSize)) {
Util::sleep(100);
continue; //abort - not enough data yet
}
//Ignore initial DTCM message, as this is a "hi" message from the server
@ -118,6 +119,8 @@ namespace Mist {
INFO_MSG("Received a wrong type of packet - '%s'", srcConn.Received().copy(4).c_str());
break;
}
}else{
Util::sleep(100);
}
}
}