File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -680,6 +680,7 @@ int flb_start(flb_ctx_t *ctx)
680680 }
681681 else if (val == FLB_ENGINE_FAILED ) {
682682 flb_error ("[lib] backend failed" );
683+ pthread_cancel (tid );
683684 pthread_join (tid , NULL );
684685 ctx -> status = FLB_LIB_ERROR ;
685686 return -1 ;
@@ -711,6 +712,7 @@ int flb_stop(flb_ctx_t *ctx)
711712 * the service exited for some reason (plugin action). Always
712713 * wait and double check that the child thread is not running.
713714 */
715+ pthread_cancel (tid );
714716 pthread_join (tid , NULL );
715717 return 0 ;
716718 }
@@ -726,6 +728,7 @@ int flb_stop(flb_ctx_t *ctx)
726728 flb_debug ("[lib] sending STOP signal to the engine" );
727729
728730 flb_engine_exit (ctx -> config );
731+ pthread_cancel (tid );
729732 ret = pthread_join (tid , NULL );
730733 if (ret != 0 ) {
731734 flb_errno ();
You can’t perform that action at this time.
0 commit comments