1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

WiFiClient: set default timeout to 5000ms for compatibility

This commit is contained in:
Ivan Grokhotkov 2017-05-18 17:55:14 +08:00 committed by Ivan Grokhotkov
parent 71512653ca
commit 684b5f1629

View File

@ -48,12 +48,13 @@ WiFiClient* SList<WiFiClient>::_s_first = 0;
WiFiClient::WiFiClient()
: _client(0)
: _client(0), _timeout(5000)
{
WiFiClient::_add(this);
}
WiFiClient::WiFiClient(ClientContext* client) : _client(client)
WiFiClient::WiFiClient(ClientContext* client)
: _client(client), _timeout(5000)
{
_client->ref();
WiFiClient::_add(this);
@ -69,6 +70,8 @@ WiFiClient::~WiFiClient()
WiFiClient::WiFiClient(const WiFiClient& other)
{
_client = other._client;
_timeout = other._timeout;
_localPort = other._localPort;
if (_client)
_client->ref();
WiFiClient::_add(this);
@ -79,6 +82,8 @@ WiFiClient& WiFiClient::operator=(const WiFiClient& other)
if (_client)
_client->unref();
_client = other._client;
_timeout = other._timeout;
_localPort = other._localPort;
if (_client)
_client->ref();
return *this;