diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index 3b362876a3a..ebf08446a6e 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -514,17 +514,13 @@ static void services_startup_timeout(struct tevent_context *ev, DEBUG(SSSDBG_TRACE_FUNC, "Handling timeout\n"); if (!ctx->services_started) { - - DEBUG(SSSDBG_CRIT_FAILURE, "Providers did not start in time, " - "forcing services startup!\n"); - - ctx->services_started = true; - - DEBUG(SSSDBG_CONF_SETTINGS, "Now starting services!\n"); - /* then start all services */ - for (i = 0; ctx->services[i]; i++) { - add_new_service(ctx, ctx->services[i], 0); - } + /* This code is more a sanity guard: if any of providers + * didn't start to this moment (MONITOR_MAX_SVC_RESTARTS), + * `monitor_restart_service()` should already have process + * terminated anyway. + */ + DEBUG(SSSDBG_CRIT_FAILURE, "Providers did not start in time!\n"); + monitor_quit(mt_ctx, 1); } }