Skip to content

Commit a15ab56

Browse files
Fix WiFiClientSecure implicit default copy ctor
These both use shared-ptrs to handle refcnts to allocated data, so using the default copy constructor is fine (and has been in use for a long time).
1 parent ef74b7c commit a15ab56

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ class WiFiClientSecure : public WiFiClient {
3737
WiFiClientSecure(const WiFiClientSecure &rhs);
3838
~WiFiClientSecure() override;
3939

40+
WiFiClientSecure& operator=(const WiFiClientSecure&) = default; // The shared-ptrs handle themselves automatically
41+
4042
int connect(IPAddress ip, uint16_t port) override;
4143
int connect(const String& host, uint16_t port) override;
4244
int connect(const char* name, uint16_t port) override;

libraries/ESP8266WiFi/src/WiFiServerSecureBearSSL.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ class WiFiServerSecure : public WiFiServer {
6262
void setServerKeyAndCert(const uint8_t *key, int keyLen, const uint8_t *cert, int certLen);
6363
void setServerKeyAndCert_P(const uint8_t *key, int keyLen, const uint8_t *cert, int certLen);
6464

65+
WiFiServerSecure& operator=(const WiFiServerSecure&) = default;
66+
6567
using ClientType = WiFiClientSecure;
6668

6769
private:

0 commit comments

Comments
 (0)