Improve operation on ESP32 and ESP8266 (add TINY_GSM_YIELD where needed)

This commit is contained in:
Volodymyr Shymanskyy
2017-09-02 17:50:52 +03:00
parent e90fc43a89
commit 454eae4876
4 changed files with 8 additions and 8 deletions

View File

@@ -491,7 +491,7 @@ private:
bool streamSkipUntil(char c) { //TODO: timeout
while (true) {
while (!stream.available()) {}
while (!stream.available()) { TINY_GSM_YIELD(); }
if (stream.read() == c)
return true;
}
@@ -550,7 +550,7 @@ private:
DBG("### Got: ", len, "->", sockets[mux]->rx.free());
}
while (len--) {
while (!stream.available()) {}
while (!stream.available()) { TINY_GSM_YIELD(); }
sockets[mux]->rx.put(stream.read());
}
data = "";