Skip to content

Commit 07fa344

Browse files
authored
fix: Remove setTimeout (#8998)
1 parent 29cde94 commit 07fa344

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

Diff for: libraries/WiFiClientSecure/src/WiFiClientSecure.cpp

-16
Original file line numberDiff line numberDiff line change
@@ -401,22 +401,6 @@ void WiFiClientSecure::setAlpnProtocols(const char **alpn_protos)
401401
{
402402
_alpn_protos = alpn_protos;
403403
}
404-
int WiFiClientSecure::setTimeout(uint32_t seconds)
405-
{
406-
_timeout = seconds * 1000;
407-
if (sslclient->socket >= 0) {
408-
struct timeval tv;
409-
tv.tv_sec = seconds;
410-
tv.tv_usec = 0;
411-
if(setSocketOption(SO_RCVTIMEO, (char *)&tv, sizeof(struct timeval)) < 0) {
412-
return -1;
413-
}
414-
return setSocketOption(SO_SNDTIMEO, (char *)&tv, sizeof(struct timeval));
415-
}
416-
else {
417-
return 0;
418-
}
419-
}
420404

421405
int WiFiClientSecure::fd() const
422406
{

Diff for: libraries/WiFiClientSecure/src/WiFiClientSecure.h

-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ class WiFiClientSecure : public WiFiClient
8080
void setAlpnProtocols(const char **alpn_protos);
8181
const mbedtls_x509_crt* getPeerCertificate() { return mbedtls_ssl_get_peer_cert(&sslclient->ssl_ctx); };
8282
bool getFingerprintSHA256(uint8_t sha256_result[32]) { return get_peer_fingerprint(sslclient, sha256_result); };
83-
int setTimeout(uint32_t seconds);
8483
int fd() const;
8584

8685
operator bool()

0 commit comments

Comments
 (0)