Skip to content

Commit 646c7b4

Browse files
committed
Conservative adjustment of optimistic_yield intervals.
10000µs for just-checking "available"-like scenenarios.
1 parent a736a95 commit 646c7b4

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
@@ -253,7 +253,7 @@ int WiFiClient::available()
253253
int result = _client->getSize();
254254

255255
if (!result) {
256-
optimistic_yield(100);
256+
optimistic_yield(10000);
257257
}
258258
return result;
259259
}

libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp

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

464464
for (int no_work = 0; blocking || no_work < 2;) {
465-
optimistic_yield(100);
465+
optimistic_yield(1000);
466466

467467
if (loopTimeout) {
468468
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)