avoid flush on esp32, add/fix debugs, longer yield when waiting for data
flush causes a bunch of reads as we try to close the socket on esp32. I think flush is broken on that platform. the comments indicate confusion. added some debug logs for important cases that were missing them, some missing newlines to exisitng logs. added a longer yield when waiting for data, in some super busy cases it could trigger a task watchdog or otherwise starve the system. (yield alone doesn't always switch to lower priority tasks) make some other yields conditional to avoid some waste when it would double-yield.
This commit is contained in:
@@ -65,8 +65,10 @@
|
||||
|
||||
#if defined(ESP8266)
|
||||
#define WEBSOCKETS_YIELD() delay(0)
|
||||
#define WEBSOCKETS_YIELD_MORE() delay(1)
|
||||
#elif defined(ESP32)
|
||||
#define WEBSOCKETS_YIELD() yield()
|
||||
#define WEBSOCKETS_YIELD_MORE() delay(1)
|
||||
#endif
|
||||
|
||||
#elif defined(STM32_DEVICE)
|
||||
|
||||
Reference in New Issue
Block a user