From cc6da052c21312588e5e3502cdc88dcd435a11fa Mon Sep 17 00:00:00 2001 From: Juraj Andrassy Date: Wed, 20 Dec 2023 20:49:07 +0100 Subject: [PATCH] WiFiClient - assignment shouldn't stop connection there may be other copy of WiFiClient working with that connection. let shared_ptr stop the connection when it is not refered anymore. --- libraries/WiFi/src/WiFiClient.cpp | 9 --------- libraries/WiFi/src/WiFiClient.h | 1 - 2 files changed, 10 deletions(-) diff --git a/libraries/WiFi/src/WiFiClient.cpp b/libraries/WiFi/src/WiFiClient.cpp index 864c33322f3..ee23e1835ff 100644 --- a/libraries/WiFi/src/WiFiClient.cpp +++ b/libraries/WiFi/src/WiFiClient.cpp @@ -197,15 +197,6 @@ WiFiClient::~WiFiClient() stop(); } -WiFiClient & WiFiClient::operator=(const WiFiClient &other) -{ - stop(); - clientSocketHandle = other.clientSocketHandle; - _rxBuffer = other._rxBuffer; - _connected = other._connected; - return *this; -} - void WiFiClient::stop() { clientSocketHandle = NULL; diff --git a/libraries/WiFi/src/WiFiClient.h b/libraries/WiFi/src/WiFiClient.h index 06e77c7cd1d..d78e00fb19e 100644 --- a/libraries/WiFi/src/WiFiClient.h +++ b/libraries/WiFi/src/WiFiClient.h @@ -71,7 +71,6 @@ class WiFiClient : public ESPLwIPClient { return connected(); } - WiFiClient & operator=(const WiFiClient &other); bool operator==(const bool value) { return bool() == value;