CPU usage fix for URIReader::readAll

This commit is contained in:
Thulinma 2020-10-30 00:06:06 +01:00
parent 194b6e1388
commit 9fc805700e

View file

@ -210,6 +210,9 @@ namespace HTTP{
}else if (stateType == HTTP::HTTP){
downer.continueNonBlocking(cb);
if (curPos == downer.const_data().size()){
Util::sleep(50);
}
curPos = downer.const_data().size();
}else{// streaming mode
int s;
@ -220,6 +223,8 @@ namespace HTTP{
cb.dataCallback(buf.data(), s);
totaal += s;
}else{
Util::sleep(50);
}
}
}