From e23e73f1d91db1b6261ba71813207e7d01cb2981 Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Fri, 9 Jun 2017 17:19:11 +0100 Subject: [PATCH] service: only force stop dependents if necessary. Only force-stop dependent services if this service is force-stopped. --- src/service.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/service.cc b/src/service.cc index 1ce35c8..1b19770 100644 --- a/src/service.cc +++ b/src/service.cc @@ -1083,7 +1083,12 @@ bool ServiceRecord::stopDependents() noexcept all_deps_stopped = false; } - (*i)->forceStop(); + if (force_stop) { + // If this service is to be forcefully stopped, dependents must also be. + (*i)->forceStop(); + } + + (*i)->do_stop(); } return all_deps_stopped; -- 2.25.1