From 29995eb604323a9da1831f510c5179f8cfefb6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Andr=C3=A1ssy?= <10706773+JAndrassy@users.noreply.github.com> Date: Tue, 16 Jan 2024 14:18:24 +0100 Subject: [PATCH] WiFiClient - assignment shouldn't stop connection (#9029) there may be other copy of WiFiClient working with that connection. let shared_ptr stop the connection when it is not refered anymore. Co-authored-by: Me No Dev --- 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 4127bcad3..52aca2f1b 100644 --- a/libraries/WiFi/src/WiFiClient.cpp +++ b/libraries/WiFi/src/WiFiClient.cpp @@ -202,15 +202,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 06e77c7cd..d78e00fb1 100644 --- a/libraries/WiFi/src/WiFiClient.h +++ b/libraries/WiFi/src/WiFiClient.h @@ -71,7 +71,6 @@ public: { return connected(); } - WiFiClient & operator=(const WiFiClient &other); bool operator==(const bool value) { return bool() == value;