From 467da7c50f460ddc569fdb779e9dc05fec59ff4b Mon Sep 17 00:00:00 2001 From: Markus Sattler Date: Wed, 23 Dec 2015 12:54:44 +0100 Subject: [PATCH] better error handling --- libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp b/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp index 2e611a554..352d76dbf 100644 --- a/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp +++ b/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp @@ -354,7 +354,7 @@ int HTTPClient::sendRequest(const char * type, Stream * stream, size_t size) { if(buff) { // read all data from stream and send it to server - while(connected() && (stream->available() != -1) && (len > 0 || len == -1)) { + while(connected() && (stream->available() > -1) && (len > 0 || len == -1)) { // get available data size size_t s = stream->available();