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

Fix WiFiClient assignment operator

This commit is contained in:
Ivan Grokhotkov 2015-02-16 03:02:42 +03:00
parent b85262e634
commit ea90d3ce92
2 changed files with 3 additions and 0 deletions

View File

@ -70,6 +70,8 @@ ICACHE_FLASH_ATTR WiFiClient::WiFiClient(const WiFiClient& other)
WiFiClient& ICACHE_FLASH_ATTR WiFiClient::operator=(const WiFiClient& other) WiFiClient& ICACHE_FLASH_ATTR WiFiClient::operator=(const WiFiClient& other)
{ {
if (_client)
_client->unref();
_client = other._client; _client = other._client;
if (_client) if (_client)
_client->ref(); _client->ref();

View File

@ -68,6 +68,7 @@ public:
void ref() void ref()
{ {
++_refcnt; ++_refcnt;
DEBUGV(":ref %d\r\n", _refcnt);
} }
void unref() void unref()