From 032644b0ef424f1f96efd84e161e87f316fb2ca2 Mon Sep 17 00:00:00 2001 From: Siddhant Srivastava Date: Fri, 6 Sep 2024 10:28:23 -0700 Subject: [PATCH] chore: override state transitions into topic --- .../java/com/aws/greengrass/lifecyclemanager/Lifecycle.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/aws/greengrass/lifecyclemanager/Lifecycle.java b/src/main/java/com/aws/greengrass/lifecyclemanager/Lifecycle.java index d23d70190c..42920d440b 100644 --- a/src/main/java/com/aws/greengrass/lifecyclemanager/Lifecycle.java +++ b/src/main/java/com/aws/greengrass/lifecyclemanager/Lifecycle.java @@ -441,9 +441,9 @@ void setState(State current, StateTransitionEvent stateTransitionEvent) { // Sync on State.class to make sure the order of setValue and globalNotifyStateChanged // are consistent across different services. try (LockScope ls = LockScope.lock(globalLock)) { - stateTopic.withValue(newState.ordinal()); - statusCodeTopic.withValue(stateTransitionEvent.getStatusCode().name()); - statusReasonTopic.withValue(stateTransitionEvent.getStatusReason()); + stateTopic.overrideValue(newState.ordinal()); + statusCodeTopic.overrideValue(stateTransitionEvent.getStatusCode().name()); + statusReasonTopic.overrideValue(stateTransitionEvent.getStatusReason()); greengrassService.getContext().globalNotifyStateChanged(greengrassService, current, newState); } }