8000 Conservative adjustment of optimistic_yield intervals. · dok-net/arduino-esp8266@598d8a1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 598d8a1

Browse files
committed
Conservative adjustment of optimistic_yield intervals.
10000µs for just-checking "available"-like scenenarios.
1 parent f4178e5 commit 598d8a1

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
@@ -247,7 +247,7 @@ int WiFiClient::available()
247247
int result = _client->getSize();
248248

249249
if (!result) {
250-
optimistic_yield(100);
250+
optimistic_yield(10000);
251251
}
252252
return result;
253253
}

libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp

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

481481
for (int no_work = 0; blocking || no_work < 2;) {
482-
optimistic_yield(100);
482+
optimistic_yield(1000);
483483

484484
if (loopTimeout) {
485485
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
@@ -118,7 +118,7 @@ int WiFiUDP::available() {
118118
if (!result) {
119119
// yielding here will not make more data "available",
120120
// but it will prevent the system from going into WDT reset
121-
optimistic_yield(1000);
121+
optimistic_yield(10000);
122122
}
123123

124124
return result;
@@ -195,7 +195,7 @@ int WiFiUDP::parsePacket()
195195
return 0;
196196

197197
if (!_ctx->next()) {
198-
optimistic_yield(100);
198+
optimistic_yield(10000);
199199
return 0;
200200
}
201201

0 commit comments

Comments
 (0)
0