Skip to content

Commit a06ceb8

Browse files
committed
Merge branch 'master' into fixPSK
2 parents 1b8f6d2 + 2301f29 commit a06ceb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/ESP8266WiFi/examples/WiFiClient/WiFiClient.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ void loop() {
7171
client.print(String("GET ") + url + " HTTP/1.1\r\n" +
7272
"Host: " + host + "\r\n" +
7373
"Connection: close\r\n\r\n");
74-
int timeout = millis() + 5000;
74+
unsigned long timeout = millis();
7575
while (client.available() == 0) {
76-
if (timeout - millis() < 0) {
76+
if (millis() - timeout > 5000) {
7777
Serial.println(">>> Client Timeout !");
7878
client.stop();
7979
return;

0 commit comments

Comments
 (0)