Stop the stop timer when a service stops.
authorDavin McCall <davmac@davmac.org>
Thu, 25 Jan 2018 23:13:35 +0000 (23:13 +0000)
committerDavin McCall <davmac@davmac.org>
Thu, 25 Jan 2018 23:13:35 +0000 (23:13 +0000)
src/proc-service.cc

index 58768ea3d145ab8ed19faa95b95c57a2d5e72b4a..49a1caec590fda133bc6adbc836a5e124b0e262f 100644 (file)
@@ -152,6 +152,9 @@ void process_service::handle_exit_status(int exit_status) noexcept
     else if (service_state == service_state_t::STOPPING) {
         // We won't log a non-zero exit status or termination due to signal here -
         // we assume that the process died because we signalled it.
+        if (stop_timer_armed) {
+            restart_timer.stop_timer(event_loop);
+        }
         stopped();
     }
     else if (smooth_recovery && service_state == service_state_t::STARTED