Skip to content

Commit a564a48

Browse files
fix: properly guard lifecycle result callbacks by generation
1 parent e1ac2f4 commit a564a48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/aws/greengrass/lifecyclemanager/GenericExternalService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,8 @@ protected void startup() throws InterruptedException {
383383
logger.atInfo().kv(EXIT_CODE, exit).log("Startup script exited");
384384
separateLogger.atInfo().kv(EXIT_CODE, exit).log("Startup script exited");
385385
State state = getState();
386-
if (startingStateGeneration == getStateGeneration() && State.STARTING.equals(state)
387-
|| State.RUNNING.equals(state)) {
386+
if (startingStateGeneration == getStateGeneration()
387+
&& (State.STARTING.equals(state) || State.RUNNING.equals(state))) {
388388
if (exit == 0 && State.STARTING.equals(state)) {
389389
reportState(State.RUNNING);
390390
} else if (exit != 0) {

0 commit comments

Comments
 (0)