Skip to content

Commit

Permalink
fix: set fss launch flag correctly when device is initially offline (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
junfuchen99 authored Apr 19, 2024
1 parent 70fa39f commit 910149b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -524,7 +526,6 @@ private void uploadFleetStatusServiceData(Set<GreengrassService> 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");
Expand Down

0 comments on commit 910149b

Please sign in to comment.