// we assume that the process died because we signalled it.
stopped();
}
- else if (smooth_recovery && service_state == ServiceState::STARTED) {
+ else if (smooth_recovery && service_state == ServiceState::STARTED && desired_state == ServiceState::STARTED) {
// TODO ensure a minimum time between restarts
// TODO if we are pinned-started then we should probably check
// that dependencies have started before trying to re-start the
* ------------------
* Each service has a dependent-count ("required_by"). This starts at 0, adds 1 if the
* service has explicitly been started (i.e. "start_explicit" is true), and adds 1 for
- * each dependent service which is not STOPPED (including depdendents with a soft dependency).
+ * each dependent service which is not STOPPED (including dependents with a soft dependency).
* When required_by transitions to 0, the service is stopped (unless it is pinned). When
* require_by transitions from 0, the service is started (unless pinned).
*