Skip to content

Commit

Permalink
refactor SSL stop method
Browse files Browse the repository at this point in the history
  • Loading branch information
floBik committed Feb 13, 2025
1 parent 5cdd776 commit 54bae41
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions src/TinyGsmClientSIM7600.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,21 +366,10 @@ class TinyGsmSim7600 : public TinyGsmModem<TinyGsmSim7600>,
}

void stop(uint32_t maxWaitMs) override {
dumpModemBuffer(maxWaitMs);
at->sendAT(GF("+CCHCLOSE="), mux);
at->waitResponse(5000L);

if (certificates[mux].length() != 0) {
deleteCertificate(certificates[mux].c_str());
}

if (!clientCertificates[mux].length() != 0) {
deleteCertificate(clientCertificates[mux].c_str());
}

if (!clientPrivateKeys[mux].length() != 0) {
deleteCertificate(clientPrivateKeys[mux].c_str());
}
GsmClientSim7600::stop(maxWaitMs);
sock_connected = false;
at->waitResponse();
}
TINY_GSM_CLIENT_CONNECT_OVERRIDES
};
Expand Down

0 comments on commit 54bae41

Please sign in to comment.