mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
oupps ! I forgot to set the timout value
This commit is contained in:
parent
6fa70bda01
commit
e166e85f73
@ -71,6 +71,7 @@ void loop() {
|
|||||||
client.print(String("GET ") + url + " HTTP/1.1\r\n" +
|
client.print(String("GET ") + url + " HTTP/1.1\r\n" +
|
||||||
"Host: " + host + "\r\n" +
|
"Host: " + host + "\r\n" +
|
||||||
"Connection: close\r\n\r\n");
|
"Connection: close\r\n\r\n");
|
||||||
|
int timeout = millis() + 5000;
|
||||||
while (client.available() == 0) {
|
while (client.available() == 0) {
|
||||||
if (timeout - millis() < 0) {
|
if (timeout - millis() < 0) {
|
||||||
Serial.println(">>> Client Timeout !");
|
Serial.println(">>> Client Timeout !");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user