diff --git a/library.json b/library.json index 228e41b..856fc7a 100644 --- a/library.json +++ b/library.json @@ -15,5 +15,5 @@ "espressif8266", "espressif32" ], - "version": "1.6.2" + "version": "1.6.3" } diff --git a/library.properties b/library.properties index 8f4b14d..4033cea 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=ESP8266 Weather Station -version=1.6.2 +version=1.6.3 author=ThingPulse maintainer=ThingPulse sentence=ESP8266 based internet connected Weather Station diff --git a/src/OpenWeatherMapCurrent.cpp b/src/OpenWeatherMapCurrent.cpp index 0de3e61..d195397 100644 --- a/src/OpenWeatherMapCurrent.cpp +++ b/src/OpenWeatherMapCurrent.cpp @@ -65,7 +65,7 @@ void OpenWeatherMapCurrent::doUpdate(OpenWeatherMapCurrentData *data, String url WiFiClient * client = http.getStreamPtr(); - while(client->connected()) { + while(client->connected() || client->available()) { while((size = client->available()) > 0) { if ((millis() - lost_do) > lostTest) { Serial.println ("lost in client with a timeout"); diff --git a/src/OpenWeatherMapForecast.cpp b/src/OpenWeatherMapForecast.cpp index 0b8bb2c..7cd39f7 100644 --- a/src/OpenWeatherMapForecast.cpp +++ b/src/OpenWeatherMapForecast.cpp @@ -68,7 +68,7 @@ uint8_t OpenWeatherMapForecast::doUpdate(OpenWeatherMapForecastData *data, Strin WiFiClient * client = http.getStreamPtr(); - while(client->connected()) { + while(client->connected() || client->available()) { while((size = client->available()) > 0) { if ((millis() - lost_do) > lostTest) { Serial.println ("lost in client with a timeout");