arduino-esp32/libraries/WiFi/src
Krzysiek S be84c8219c
[WiFiClient] Default connection timeout, when no timeout provided (#5487)
## The problem
WiFiClient's connect method variant where no timeout is passed can block esp32 MCU and may then cause watchdog to kick in and reset the device. This behavior is different from that, what is in arduino-esp8266 core.

## Summary
Some cross-esp libraries (working both on esp32 and 8266), like PubSubClient simply call connect method on WiFiClient, to get connected to remote server. However, connect behavior varies betwen esp arduino 8266 and esp arduino 32 cores. This pull request tries introduce same behavior - to make connect method non-blocking on esp32, like it is with 8266 arduino core.

## Proposed solution
Introduce default fixed timeout that can be changed by #define - by default set to 3 seconds.

### Affected components: 
WiFiClient

### Affected methods:
```c++ 
int connect(IPAddress ip, uint16_t port);
int connect(const char *host, uint16_t port);
```

### Impact
May impact projects or libraries using connect method variant without specified timeout, where:
- remote is located far away or
- connection is heavily limited, or
- remote is slow, when it comes to accept the connection
2021-08-02 15:05:44 +03:00
..
ETH.cpp Enable clock output for Ethernet RMII on ESP32 (#5274) 2021-06-16 20:45:20 +03:00
ETH.h Enable clock output for Ethernet RMII on ESP32 (#5274) 2021-06-16 20:45:20 +03:00
WiFi.cpp v2.0.0 Add support for ESP32S2 and update ESP-IDF to 4.4 (#4996) 2021-04-05 14:23:58 +03:00
WiFi.h Separate Provisioning library from WiFi library (#4547) 2020-11-19 00:12:16 +02:00
WiFiAP.cpp IDF master d93887f9f (#5336) 2021-07-17 01:57:49 +03:00
WiFiAP.h Add FTM support and examples (#5272) 2021-06-16 21:24:48 +03:00
WiFiClient.cpp [WiFiClient] Default connection timeout, when no timeout provided (#5487) 2021-08-02 15:05:44 +03:00
WiFiClient.h Fix HTTP Client with SSL (#3216) 2019-09-16 19:14:32 +03:00
WiFiGeneric.cpp Fix WiFi Deinit bug 2021-08-02 14:57:55 +03:00
WiFiGeneric.h Add FTM support and examples (#5272) 2021-06-16 21:24:48 +03:00
WiFiMulti.cpp Fix wrong password same SSID (#5124) 2021-06-10 13:19:58 +03:00
WiFiMulti.h Cleanup WiFiMulti (#2955) 2019-07-09 19:21:01 +03:00
WiFiScan.cpp v2.0.0 Add support for ESP32S2 and update ESP-IDF to 4.4 (#4996) 2021-04-05 14:23:58 +03:00
WiFiScan.h Added the channel parameter to the scan fucntion in order to select which channel to scan. (#3638) 2020-01-20 16:13:10 +02:00
WiFiServer.cpp v2.0.0 Add support for ESP32S2 and update ESP-IDF to 4.4 (#4996) 2021-04-05 14:23:58 +03:00
WiFiServer.h Allow faster reuse of socket, to be able to restart WifiServer. (#4306) 2020-11-06 14:16:50 +02:00
WiFiSTA.cpp IDF master d93887f9f (#5336) 2021-07-17 01:57:49 +03:00
WiFiSTA.h Fix some WiFi issues (#5395) 2021-07-16 14:48:57 +03:00
WiFiType.h v2.0.0 Add support for ESP32S2 and update ESP-IDF to 4.4 (#4996) 2021-04-05 14:23:58 +03:00
WiFiUdp.cpp Memory leak (#1672) 2018-07-25 12:56:41 +02:00
WiFiUdp.h Add Server and UDP and fix WiFi.hostByName 2016-12-30 02:44:45 +02:00