diff --git a/HttpClient.cpp b/HttpClient.cpp index 5d9b0ad..9a42612 100644 --- a/HttpClient.cpp +++ b/HttpClient.cpp @@ -55,7 +55,7 @@ int HttpClient::startRequest(const char* aServerName, uint16_t aServerPort, cons if (iProxyPort) { - if (!iClient->connect(iProxyAddress, iProxyPort)) + if (!iClient->connect(iProxyAddress, iProxyPort) > 0) { #ifdef LOGGING Serial.println("Proxy connection failed"); @@ -65,7 +65,7 @@ int HttpClient::startRequest(const char* aServerName, uint16_t aServerPort, cons } else { - if (!iClient->connect(aServerName, aServerPort)) + if (!iClient->connect(aServerName, aServerPort) > 0) { #ifdef LOGGING Serial.println("Connection failed"); @@ -87,7 +87,7 @@ int HttpClient::startRequest(const IPAddress& aServerAddress, uint16_t aServerPo if (iProxyPort) { - if (!iClient->connect(iProxyAddress, iProxyPort)) + if (!iClient->connect(iProxyAddress, iProxyPort) > 0) { #ifdef LOGGING Serial.println("Proxy connection failed"); @@ -97,7 +97,7 @@ int HttpClient::startRequest(const IPAddress& aServerAddress, uint16_t aServerPo } else { - if (!iClient->connect(aServerAddress, aServerPort)) + if (!iClient->connect(aServerAddress, aServerPort) > 0) { #ifdef LOGGING Serial.println("Connection failed"); diff --git a/HttpClient.h b/HttpClient.h index e86f54e..e703e63 100644 --- a/HttpClient.h +++ b/HttpClient.h @@ -277,7 +277,6 @@ class HttpClient : public Client // Inherited from Print virtual size_t write(uint8_t aByte) { return iClient-> write(aByte); }; - virtual size_t write(const char *aStr) { return iClient->write(aStr); }; virtual size_t write(const uint8_t *aBuffer, size_t aSize) { return iClient->write(aBuffer, aSize); }; // Inherited from Stream virtual int available() { return iClient->available(); };