Check for connection before ublox disconnect - don't want to wait 2 mins

This commit is contained in:
Sara Damiano
2019-05-07 16:33:06 -04:00
parent f7aa4a6c6a
commit 38ce7c5478

View File

@@ -782,6 +782,7 @@ protected:
bool modemDisconnect(uint8_t mux) {
TINY_GSM_YIELD();
if (!modemGetConnected(mux)) return true;
if (isCatM) { // These modems allow a faster "asynchronous" close
sendAT(GF("+USOCL="), mux, GF(",1"));
int rsp = waitResponse(120000L);