Skip to content

Commit 42e29d6

Browse files
CharlieR-o-o-tedsiper
authored andcommitted
engine: fix endless loop on reload
Signed-off-by: Siarhei Rasiukevich <[email protected]>
1 parent 2b9741c commit 42e29d6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/flb_engine.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,11 +1036,6 @@ int flb_engine_start(struct flb_config *config)
10361036
event->priority = FLB_ENGINE_PRIORITY_SHUTDOWN;
10371037
}
10381038
else if (ret == FLB_ENGINE_SHUTDOWN) {
1039-
if (config->shutdown_fd > 0) {
1040-
mk_event_timeout_destroy(config->evl,
1041-
&config->event_shutdown);
1042-
}
1043-
10441039
/* Increase the grace counter */
10451040
config->grace_count++;
10461041

@@ -1105,6 +1100,12 @@ int flb_engine_start(struct flb_config *config)
11051100
tasks);
11061101
ret = config->exit_status_code;
11071102
flb_engine_shutdown(config);
1103+
1104+
if (config->shutdown_fd > 0) {
1105+
mk_event_timeout_destroy(config->evl,
1106+
&config->event_shutdown);
1107+
}
1108+
11081109
config = NULL;
11091110
return ret;
11101111
}

0 commit comments

Comments
 (0)