Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions libraries/WiFi/src/WiFiClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <lwip/netdb.h>
#include <errno.h>

#define WIFI_CLIENT_DEF_CONN_TIMEOUT (3)
#define WIFI_CLIENT_MAX_WRITE_RETRY (10)
#define WIFI_CLIENT_SELECT_TIMEOUT_US (1000000)
#define WIFI_CLIENT_FLUSH_BUFFER_SIZE (1024)
Expand Down Expand Up @@ -207,7 +208,7 @@ void WiFiClient::stop()

int WiFiClient::connect(IPAddress ip, uint16_t port)
{
return connect(ip,port,-1);
return connect(ip,port,WIFI_CLIENT_DEF_CONN_TIMEOUT);
}
int WiFiClient::connect(IPAddress ip, uint16_t port, int32_t timeout)
{
Expand Down Expand Up @@ -278,7 +279,7 @@ int WiFiClient::connect(IPAddress ip, uint16_t port, int32_t timeout)

int WiFiClient::connect(const char *host, uint16_t port)
{
return connect(host,port,-1);
return connect(host,port,WIFI_CLIENT_DEF_CONN_TIMEOUT);
}
int WiFiClient::connect(const char *host, uint16_t port, int32_t timeout)
{
Expand Down