From c13d11e7d10ba4e53a9d30338ec8f9b1bca114ad Mon Sep 17 00:00:00 2001 From: pmalhaire <7273249+pmalhaire@users.noreply.github.com> Date: Tue, 9 Jul 2019 18:39:12 +0200 Subject: [PATCH] fix empty reply from server error (#2903) The flush causes an empty response a client side. see https://github.com/espressif/arduino-esp32/issues/2902 --- libraries/ESPmDNS/examples/mDNS_Web_Server/mDNS_Web_Server.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/ESPmDNS/examples/mDNS_Web_Server/mDNS_Web_Server.ino b/libraries/ESPmDNS/examples/mDNS_Web_Server/mDNS_Web_Server.ino index b25e33b9..8763d8d6 100644 --- a/libraries/ESPmDNS/examples/mDNS_Web_Server/mDNS_Web_Server.ino +++ b/libraries/ESPmDNS/examples/mDNS_Web_Server/mDNS_Web_Server.ino @@ -96,7 +96,6 @@ void loop(void) req = req.substring(addr_start + 1, addr_end); Serial.print("Request: "); Serial.println(req); - client.flush(); String s; if (req == "/") @@ -115,6 +114,7 @@ void loop(void) } client.print(s); + client.stop(); Serial.println("Done with client"); }