mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-22 21:23:07 +03:00
WiFiClient: set default timeout to 5000ms for compatibility
This commit is contained in:
parent
71512653ca
commit
684b5f1629
@ -48,12 +48,13 @@ WiFiClient* SList<WiFiClient>::_s_first = 0;
|
|||||||
|
|
||||||
|
|
||||||
WiFiClient::WiFiClient()
|
WiFiClient::WiFiClient()
|
||||||
: _client(0)
|
: _client(0), _timeout(5000)
|
||||||
{
|
{
|
||||||
WiFiClient::_add(this);
|
WiFiClient::_add(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
WiFiClient::WiFiClient(ClientContext* client) : _client(client)
|
WiFiClient::WiFiClient(ClientContext* client)
|
||||||
|
: _client(client), _timeout(5000)
|
||||||
{
|
{
|
||||||
_client->ref();
|
_client->ref();
|
||||||
WiFiClient::_add(this);
|
WiFiClient::_add(this);
|
||||||
@ -69,6 +70,8 @@ WiFiClient::~WiFiClient()
|
|||||||
WiFiClient::WiFiClient(const WiFiClient& other)
|
WiFiClient::WiFiClient(const WiFiClient& other)
|
||||||
{
|
{
|
||||||
_client = other._client;
|
_client = other._client;
|
||||||
|
_timeout = other._timeout;
|
||||||
|
_localPort = other._localPort;
|
||||||
if (_client)
|
if (_client)
|
||||||
_client->ref();
|
_client->ref();
|
||||||
WiFiClient::_add(this);
|
WiFiClient::_add(this);
|
||||||
@ -79,6 +82,8 @@ WiFiClient& WiFiClient::operator=(const WiFiClient& other)
|
|||||||
if (_client)
|
if (_client)
|
||||||
_client->unref();
|
_client->unref();
|
||||||
_client = other._client;
|
_client = other._client;
|
||||||
|
_timeout = other._timeout;
|
||||||
|
_localPort = other._localPort;
|
||||||
if (_client)
|
if (_client)
|
||||||
_client->ref();
|
_client->ref();
|
||||||
return *this;
|
return *this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user