forceStop() needs to issue stop().
authorDavin McCall <davmac@davmac.org>
Tue, 1 Sep 2015 19:35:33 +0000 (20:35 +0100)
committerDavin McCall <davmac@davmac.org>
Tue, 1 Sep 2015 19:35:33 +0000 (20:35 +0100)
Both were issued when a process died unexpectedly, but in case of
a dependent, forceStop() would be issued without stop() meaning that
the dependent would not actually stop.

service.cc

index 93ffa1aabe1fbb4d82f64e035f442ffd163f7b89..c77f7fdbecbf832ecd653cccc3ae05f925408f01 100644 (file)
@@ -92,7 +92,6 @@ void ServiceRecord::process_child_callback(struct ev_loop *loop, ev_child *w, in
         }
         else {
             sr->forceStop();
-            sr->stop();
         }
         
         if (sr->auto_restart && sr->service_set->get_auto_restart()) {
@@ -385,6 +384,7 @@ bool ServiceRecord::start_ps_process(const std::vector<std::string> &pargs)
 void ServiceRecord::forceStop()
 {
     force_stop = true;
+    stop();
     for (sr_iter i = dependents.begin(); i != dependents.end(); i++) {
         (*i)->forceStop();
     }