From 9389927820ad4142ca6a6ddb6f0c50b43f5703e2 Mon Sep 17 00:00:00 2001 From: Develo Date: Fri, 7 Sep 2018 14:21:56 -0300 Subject: [PATCH] read all lines from slow servers 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); }