We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1368a82 commit 6fa70bdCopy full SHA for 6fa70bd
libraries/ESP8266WiFi/examples/WiFiClient/WiFiClient.ino
@@ -71,7 +71,13 @@ void loop() {
71
client.print(String("GET ") + url + " HTTP/1.1\r\n" +
72
"Host: " + host + "\r\n" +
73
"Connection: close\r\n\r\n");
74
- delay(10);
+ while (client.available() == 0) {
75
+ if (timeout - millis() < 0) {
76
+ Serial.println(">>> Client Timeout !");
77
+ client.stop();
78
+ return;
79
+ }
80
81
82
// Read all the lines of the reply from server and print them to Serial
83
while(client.available()){
0 commit comments