浏览代码

Perform release on stop if activation count 0

Other recent changes make this necessary; release is re-worked.
Davin McCall 3 年之前
父节点
当前提交
69c49f0374
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/service.cc

+ 4 - 0
src/service.cc

@@ -497,6 +497,10 @@ void service_record::stop(bool bring_down) noexcept
     // If our required_by count is 0, we should treat this as a full manual stop regardless
     if (required_by == 0) {
         bring_down = true;
+        prop_release = !prop_require;
+        if (prop_release) {
+            services->add_prop_queue(this);
+        }
     }
 
     // Set desired state to STOPPED, this will be set back to STARTED if there any hard dependents