diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/OmnipodCommunicationManager.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/OmnipodCommunicationManager.java index fecd5beeb5..b7ddf011ae 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/OmnipodCommunicationManager.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/comm/OmnipodCommunicationManager.java @@ -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);