Browse Source

Minor tweak to handling of stop pins

start() now bails out if stop pin is set, regardless of state (rather
than only doing so if state was already STOPPED). This makes it
impossible to "bypass" the stopped state and go from STOPPING to
STARTING.
Davin McCall 3 years ago
parent
commit
fa265b4870
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/service.cc

+ 2 - 2
src/service.cc

@@ -187,8 +187,8 @@ void service_record::release_dependencies() noexcept
 
 void service_record::start() noexcept
 {
-    if (service_state == service_state_t::STOPPED && pinned_stopped) {
-        // bail out early for this special case
+    if (pinned_stopped) {
+        // bail out early for this case, we don't want to set start_explicit
         return;
     }