8000 Merge pull request #515 from simap/esp32yield · adamczuk-piotr/arduinoWebSockets@04e4be0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 04e4be0

Browse files
authored
Merge pull request Links2004#515 from simap/esp32yield
add a yield here for esp32 to avoid a busy loop
2 parents c038f10 + ebd7a52 commit 04e4be0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/WebSockets.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,9 @@ bool WebSockets::readCb(WSclient_t * client, uint8_t * out, size_t n, WSreadWait
625625
if(!client->tcp->available()) {
626626
#if(WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266)
627627
delay(0);
628+
#endif
629+
#if(WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP32)
630+
yield();
628631
#endif
629632
continue;
630633
}

0 commit comments

Comments
 (0)
0