fix #445 #446 set TCP timeout for ESP32 on connect

This commit is contained in:
Links
2019-06-20 10:06:21 +02:00
parent 294436840c
commit 6a76efa791

View File

@ -190,8 +190,11 @@ void WebSocketsClient::loop(void) {
DEBUG_WEBSOCKETS("[WS-Client] creating Network class failed!");
return;
}
#if defined(ESP32)
if(_client.tcp->connect(_host.c_str(), _port, WEBSOCKETS_TCP_TIMEOUT)) {
#else
if(_client.tcp->connect(_host.c_str(), _port)) {
#endif
connectedCb();
_lastConnectionFail = 0;
} else {