private _handshake_timeout, set to reflect arduino-esp32 WiFiClientSecure by default
This commit is contained in:
@@ -211,7 +211,7 @@ int WiFiSSLClient::connect(const char* host, uint16_t port, const char* client_c
|
|||||||
if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) {
|
if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) {
|
||||||
ets_printf("Error performing SSL handshake");
|
ets_printf("Error performing SSL handshake");
|
||||||
}
|
}
|
||||||
if((millis() - start_handshake) > handshake_timeout){
|
if((millis() - start_handshake) > _handshake_timeout){
|
||||||
ets_printf("SSL Handshake Timeout\n");
|
ets_printf("SSL Handshake Timeout\n");
|
||||||
stop();
|
stop();
|
||||||
return -1;
|
return -1;
|
||||||
@@ -358,7 +358,7 @@ void WiFiSSLClient::setPrivateKey(const char *private_key)
|
|||||||
|
|
||||||
void WiFiSSLClient::setHandshakeTimeout(unsigned long timeout)
|
void WiFiSSLClient::setHandshakeTimeout(unsigned long timeout)
|
||||||
{
|
{
|
||||||
handshake_timeout = timeout * 1000;
|
_handshake_timeout = timeout * 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WiFiSSLClient::flush()
|
void WiFiSSLClient::flush()
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public:
|
|||||||
virtual operator bool();
|
virtual operator bool();
|
||||||
virtual void setCertificate(const char *client_ca);
|
virtual void setCertificate(const char *client_ca);
|
||||||
virtual void setPrivateKey (const char *private_key);
|
virtual void setPrivateKey (const char *private_key);
|
||||||
virtual void setHandshakeTimeout(unsigned long handshake_timeout);
|
virtual void setHandshakeTimeout(unsigned long timeout);
|
||||||
|
|
||||||
// using Print::write;
|
// using Print::write;
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ private:
|
|||||||
mbedtls_pk_context _clientKey;
|
mbedtls_pk_context _clientKey;
|
||||||
bool _connected;
|
bool _connected;
|
||||||
int _peek;
|
int _peek;
|
||||||
unsigned long handshake_timeout;
|
unsigned long _handshake_timeout = 120000;
|
||||||
|
|
||||||
SemaphoreHandle_t _mbedMutex;
|
SemaphoreHandle_t _mbedMutex;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user