Skip to content

Commit 041d2bb

Browse files
committed
Conservative adjustment of optimistic_yield intervals.
10000µs for just-checking "available"-like scenenarios.
1 parent 137d421 commit 041d2bb

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

libraries/ESP8266WiFi/src/WiFiClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ int WiFiClient::available()
251251
int result = _client->getSize();
252252

253253
if (!result) {
254-
optimistic_yield(100);
254+
optimistic_yield(10000);
255255
}
256256
return result;
257257
}

libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ int WiFiClientSecureCtx::_run_until(unsigned target, bool blocking) {
487487
esp8266::polledTimeout::oneShotMs loopTimeout(_timeout);
488488

489489
for (int no_work = 0; blocking || no_work < 2;) {
490-
optimistic_yield(100);
490+
optimistic_yield(1000);
491491

492492
if (loopTimeout) {
493493
DEBUG_BSSL("_run_until: Timeout\n");

libraries/ESP8266WiFi/src/WiFiUdp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ int WiFiUDP::available() {
117117
if (!result) {
118118
// yielding here will not make more data "available",
119119
// but it will prevent the system from going into WDT reset
120-
optimistic_yield(1000);
120+
optimistic_yield(10000);
121121
}
122122

123123
return result;
@@ -194,7 +194,7 @@ int WiFiUDP::parsePacket()
194194
return 0;
195195

196196
if (!_ctx->next()) {
197-
optimistic_yield(100);
197+
optimistic_yield(10000);
198198
return 0;
199199
}
200200

0 commit comments

Comments
 (0)