From 018e8ae8b6d4a00ed21eaa1f8b69900efb4800fb Mon Sep 17 00:00:00 2001 From: Mathieu Carbou Date: Wed, 17 Jul 2024 16:02:20 +0200 Subject: [PATCH] Try remove busy loop to fix https://github.com/mathieucarbou/ESPAsyncWebServer/issues/57 --- src/AsyncTCP.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/AsyncTCP.cpp b/src/AsyncTCP.cpp index a20151a..6266fd3 100644 --- a/src/AsyncTCP.cpp +++ b/src/AsyncTCP.cpp @@ -1097,12 +1097,9 @@ size_t AsyncClient::write(const char* data) { size_t AsyncClient::write(const char* data, size_t size, uint8_t apiflags) { size_t will_send = add(data, size, apiflags); - if(!will_send) { + if(!will_send || !send()) { return 0; } - while (connected() && !send()) { - taskYIELD(); - } return will_send; }