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 6a3342d89d..d8f6be6c0f 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 @@ -122,7 +122,7 @@ class OmnipodDashPumpPlugin @Inject constructor( createFakeTBRWhenNoActivePod() .subscribeOn(aapsSchedulers.io) .doOnError { aapsLogger.warn(LTag.PUMP, "Error on createFakeTBRWhenNoActivePod=$it") } - .blockingAwait() + .blockingSubscribe() handler.postDelayed(statusChecker, STATUS_CHECK_INTERVAL_MS) } } @@ -249,7 +249,7 @@ class OmnipodDashPumpPlugin @Inject constructor( omnipodManager.connect(it).ignoreElements() .doOnError { aapsLogger.info(LTag.PUMPCOMM, "connect error=$it") } .doOnComplete { podStateManager.incrementSuccessfulConnectionAttemptsAfterRetries() } - .blockingAwait() + .blockingSubscribe() } } finally { synchronized(this) { @@ -293,7 +293,7 @@ class OmnipodDashPumpPlugin @Inject constructor( .doOnError { aapsLogger.error(LTag.PUMP, "Error in getPumpStatus", it) } - .blockingAwait() + .blockingSubscribe() } private fun getPodStatus(): Completable = Completable.concat( @@ -687,7 +687,7 @@ class OmnipodDashPumpPlugin @Inject constructor( aapsLogger.debug(LTag.PUMP, "waitForBolusDeliveryToComplete errorGettingStatus=$errorGettingStatus") Thread.sleep(BOLUS_RETRY_INTERVAL_MS) // retry every 2 sec } - .blockingAwait() + .blockingSubscribe() } if (errorGettingStatus != null) { // requestedBolusAmount will be updated later, via pumpSync @@ -727,7 +727,7 @@ class OmnipodDashPumpPlugin @Inject constructor( aapsLogger.debug(LTag.PUMP, "waitForBolusDeliveryToComplete errorGettingStatus=$errorGettingStatus") Thread.sleep(BOLUS_RETRY_INTERVAL_MS) // retry every 3 sec } - .blockingAwait() + .blockingSubscribe() if (errorGettingStatus != null) { continue }