service: fix recently introduced double-start bug.
authorDavin McCall <davmac@davmac.org>
Fri, 7 Jul 2017 17:13:40 +0000 (18:13 +0100)
committerDavin McCall <davmac@davmac.org>
Fri, 7 Jul 2017 17:15:56 +0000 (18:15 +0100)
src/service.cc

index d8060858ec1fdb852e8c0a2d6fa9e46b444955f3..47081d7656fb5c8d417b792e340fb0e11825bb2a 100644 (file)
@@ -878,7 +878,10 @@ bool service_record::start_ps_process() noexcept
 bool base_process_service::start_ps_process() noexcept
 {
     if (restarting) {
-        return restart_ps_process();
+        if (pid == -1) {
+            return restart_ps_process();
+        }
+        return true;
     }
     else {
         eventLoop.get_time(restart_interval_time, clock_type::MONOTONIC);