diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt index cfd2b28061..38fb460368 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt @@ -130,6 +130,11 @@ class OmnipodDashPumpPlugin @Inject constructor( } override fun getPumpStatus(reason: String) { + if (reason != "REQUESTED BY USER" && !podStateManager.isActivationCompleted) { + // prevent races on BLE whent the pod is not activated + return + } + val throwable = getPodStatus().blockingGet() if (throwable != null) { aapsLogger.error(LTag.PUMP, "Error in getPumpStatus", throwable)