From a3da07d95cf369f534213415066559b0f504c72d Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Fri, 15 Jun 2018 17:08:54 +0100 Subject: [PATCH] Don't try to stop an already stopped service. It might or might not actually cause a problem, but it will at least perform some unnecessary work, so don't do it. --- src/service.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service.cc b/src/service.cc index 8aeb176..2021d4f 100644 --- a/src/service.cc +++ b/src/service.cc @@ -459,7 +459,7 @@ void service_record::stop(bool bring_down) noexcept release(); } - if (bring_down) { + if (bring_down && service_state != service_state_t::STOPPED) { do_stop(); } } -- 2.25.1