We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5dd6acc + e4e182a commit 2301f29Copy full SHA for 2301f29
libraries/ESP8266WiFi/examples/WiFiClient/WiFiClient.ino
@@ -71,9 +71,9 @@ 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
- int timeout = millis() + 5000;
+ unsigned long timeout = millis();
75
while (client.available() == 0) {
76
- if (timeout - millis() < 0) {
+ if (millis() - timeout > 5000) {
77
Serial.println(">>> Client Timeout !");
78
client.stop();
79
return;
0 commit comments