This commit is contained in:
Andrei Vereha 2021-04-26 21:57:32 +02:00
parent cddf7a3f68
commit 8d112a12ca
3 changed files with 3 additions and 3 deletions

View file

@ -475,7 +475,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
// If it gets called later, we will have the command as "not sent" in history and will not try to
// get it's final status, even if it was send
podStateManager.markActiveCommandFailed()
podStateManager.maybeMarkActiveCommandFailed()
source.onSuccess(
PumpEnactResult(injector).success(false).enacted(false).comment(throwable.message)
)

View file

@ -68,7 +68,7 @@ interface OmnipodDashPodStateManager {
fun createActiveCommand(historyId: String): Completable
fun updateActiveCommand(): Maybe<PodEvent>
fun markActiveCommandFailed()
fun maybeMarkActiveCommandFailed()
data class ActiveCommand(
val sequence: Short,

View file

@ -201,7 +201,7 @@ class OmnipodDashPodStateManagerImpl @Inject constructor(
}
@Synchronized
override fun markActiveCommandFailed() {
override fun maybeMarkActiveCommandFailed() {
podState.activeCommand?.run {
if (sentRealtime < createdRealtime) {
// command was not sent