From 4fdff072e836a03df5ccd3ddf98ff8ba39b29db8 Mon Sep 17 00:00:00 2001 From: Develo Date: Fri, 7 Sep 2018 15:07:59 -0300 Subject: [PATCH] read all lines from slow servers (#5113) Replaces #1829 --- libraries/ESP8266WiFi/examples/WiFiClient/WiFiClient.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/ESP8266WiFi/examples/WiFiClient/WiFiClient.ino b/libraries/ESP8266WiFi/examples/WiFiClient/WiFiClient.ino index 6634a53e6e..c0e3ee6d73 100644 --- a/libraries/ESP8266WiFi/examples/WiFiClient/WiFiClient.ino +++ b/libraries/ESP8266WiFi/examples/WiFiClient/WiFiClient.ino @@ -85,7 +85,7 @@ void loop() { } // Read all the lines of the reply from server and print them to Serial - while (client.available()) { + while (client.available() || client.connected()) { String line = client.readStringUntil('\r'); Serial.print(line); }