Skip to content

Commit

Permalink
WiFiClient: set default timeout to 5000ms for compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
igrr committed May 19, 2017
1 parent 7151265 commit 684b5f1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions libraries/ESP8266WiFi/src/WiFiClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit 684b5f1

Please sign in to comment.