Update last failed communication time when an exception is thrown in OmnipodCommunicationManager.transportMessages and add log response from the Pod when exchanging messages
This commit is contained in:
parent
ae86e7fc06
commit
0ba26e8b2c
1 changed files with 9 additions and 1 deletions
|
@ -141,7 +141,15 @@ public class OmnipodCommunicationManager extends RileyLinkCommunicationManager {
|
|||
podStateManager.advanceToNextNonce();
|
||||
}
|
||||
|
||||
MessageBlock responseMessageBlock = transportMessages(podStateManager, message, addressOverride, ackAddressOverride);
|
||||
MessageBlock responseMessageBlock;
|
||||
try {
|
||||
responseMessageBlock = transportMessages(podStateManager, message, addressOverride, ackAddressOverride);
|
||||
} catch (Exception ex) {
|
||||
podStateManager.setLastFailedCommunication(DateTime.now());
|
||||
throw ex;
|
||||
}
|
||||
|
||||
aapsLogger.debug(LTag.PUMPCOMM, "Received response from the Pod [responseMessageBlock={}]", responseMessageBlock);
|
||||
|
||||
if (responseMessageBlock instanceof StatusResponse) {
|
||||
podStateManager.updateFromStatusResponse((StatusResponse) responseMessageBlock);
|
||||
|
|
Loading…
Reference in a new issue