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); } }