Merge pull request #515 from simap/esp32yield

add a yield here for esp32 to avoid a busy loop
This commit is contained in:
Markus authored and GitHub committed 2020-02-15 22:18:08 +01:00
commit 04e4be03fe
1 file changed
+3
+3
View File
@@ -625,6 +625,9 @@ bool WebSockets::readCb(WSclient_t * client, uint8_t * out, size_t n, WSreadWait
if(!client->tcp->available()) {
#if(WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266)
delay(0);
#endif
#if(WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP32)
yield();
#endif
continue;
}