Skip to content

Commit 2f49062

Browse files
committed
removed setTimeout from WifiClient - read/write timeouts in constructor now
1 parent c1183e4 commit 2f49062

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

libraries/WiFi/src/WiFiClient.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ void WiFiClient::stop()
211211
clientSocketHandle = NULL;
212212
_rxBuffer = NULL;
213213
_connected = false;
214+
_lastReadTimeout = 0;
215+
_lastWriteTimeout = 0;
214216
}
215217

216218
int WiFiClient::connect(IPAddress ip, uint16_t port)
@@ -331,13 +333,6 @@ int WiFiClient::getSocketOption(int level, int option, const void* value, size_t
331333
return res;
332334
}
333335

334-
void WiFiClient::setTimeout(uint32_t seconds)
335-
{
336-
_lastReadTimeout = _timeout;
337-
_lastWriteTimeout = _timeout;
338-
_timeout = seconds * 1000;
339-
}
340-
341336
int WiFiClient::setOption(int option, int *value)
342337
{
343338
return setSocketOption(IPPROTO_TCP, option, (const void*)value, sizeof(int));

libraries/WiFi/src/WiFiClient.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ class WiFiClient : public ESPLwIPClient
9292
int getSocketOption(int level, int option, const void* value, size_t size);
9393
int setOption(int option, int *value);
9494
int getOption(int option, int *value);
95-
void setTimeout(uint32_t seconds);
9695
int setNoDelay(bool nodelay);
9796
bool getNoDelay();
9897

0 commit comments

Comments
 (0)