From d8b9f2e18aa0b6cf81032353efc5e14ba1e44c9b Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Wed, 4 Dec 2019 22:19:19 +1000 Subject: [PATCH] Set target state to STOPPED when stop is issued --- src/service.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/service.cc b/src/service.cc index 16cb394..18987c6 100644 --- a/src/service.cc +++ b/src/service.cc @@ -493,6 +493,8 @@ void service_record::stop(bool bring_down) noexcept bring_down = true; } + desired_state = service_state_t::STOPPED; + if (bring_down && service_state != service_state_t::STOPPED && service_state != service_state_t::STOPPING) { stop_reason = stopped_reason_t::NORMAL; -- 2.25.1