From 2a396eb9fadacb15a8dabfcfef9d48d0821da2a4 Mon Sep 17 00:00:00 2001 From: junfuchen99 <46911108+junfuchen99@users.noreply.github.com> Date: Fri, 19 Apr 2024 12:28:49 -0400 Subject: [PATCH] fix: set fss launch flag correctly when device is initially offline (#1615) (cherry picked from commit 910149ba5ee9232a4626b2e9ce00b383a4ed9f65) --- .../java/com/aws/greengrass/status/FleetStatusService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/aws/greengrass/status/FleetStatusService.java b/src/main/java/com/aws/greengrass/status/FleetStatusService.java index 50c5cf0691..713961fc64 100644 --- a/src/main/java/com/aws/greengrass/status/FleetStatusService.java +++ b/src/main/java/com/aws/greengrass/status/FleetStatusService.java @@ -398,6 +398,8 @@ private void updatePeriodicFleetStatusData() { * Trigger a Fleet Status update at kernel launch. */ public void triggerFleetStatusUpdateAtKernelLaunch() { + // kernel launch indicates FSS setup is completed + isLaunchMessageSent.set(true); if (!deviceConfiguration.isDeviceConfiguredToTalkToCloud()) { logger.atWarn().kv("trigger", Trigger.NUCLEUS_LAUNCH).log("Status won't be published until Nucleus is " + "configured online"); @@ -524,7 +526,6 @@ private void uploadFleetStatusServiceData(Set greengrassServi logger.atDebug().log("Not updating fleet status data since FSS is being set up"); return; } - isLaunchMessageSent.compareAndSet(false, true); if (!isConnected.get() && !Trigger.isCloudDeploymentTrigger(trigger)) { logger.atDebug().log("Not updating fleet status data since MQTT connection is interrupted");