Skip to content

Commit d2bdf9b

Browse files
committed
Since 'begin' is only called once we do not need to check if _sslClient has been assigned a valid value - it should have the NULL value assigned at object construction
1 parent 03b18c6 commit d2bdf9b

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/ArduinoIoTCloudTCP.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,6 @@ int ArduinoIoTCloudTCP::begin(String brokerAddress, uint16_t brokerPort) {
112112
ArduinoBearSSL.onGetTime(getTime);
113113
#endif /* BOARD_HAS_ECCX08 */
114114

115-
if (_sslClient) {
116-
delete _sslClient;
117-
_sslClient = NULL;
118-
}
119-
120115
#ifdef BOARD_HAS_ECCX08
121116
_sslClient = new BearSSLClient(_connection->getClient(), ArduinoIoTCloudTrustAnchor, ArduinoIoTCloudTrustAnchor_NUM);
122117
_sslClient->setEccSlot(keySlot, ECCX08Cert.bytes(), ECCX08Cert.length());

0 commit comments

Comments
 (0)