Tacked in some maintains to hopefully reduce missed URC's

This commit is contained in:
Sara Damiano
2019-05-07 16:18:54 -04:00
parent a63fd05fed
commit f7aa4a6c6a
6 changed files with 27 additions and 3 deletions

View File

@@ -638,6 +638,7 @@ protected:
return 0;
}
// TODO: Wait for ACK? AT+QISEND=id,0
maintain(); // look for a very quick response from the remote
return len;
}
@@ -656,6 +657,7 @@ protected:
}
waitResponse();
DBG("### READ:", len, "from", mux);
maintain(); // Listen for a close or other URC
return len;
}
@@ -672,6 +674,7 @@ protected:
if (!result) {
sockets[mux]->sock_connected = modemGetConnected(mux);
}
maintain(); // Listen for a close or other URC
return result;
}
@@ -690,6 +693,7 @@ protected:
int res = stream.readStringUntil(',').toInt(); // socket state
waitResponse();
maintain(); // Listen for a close or other URC
// 0 Initial, 1 Opening, 2 Connected, 3 Listening, 4 Closing
return 2 == res;