ServiceRecord *record = loadServiceRecord(name);
record->start();
+ processQueues(true);
}
void ServiceSet::stopService(const std::string & name) noexcept
if (will_restart) {
// Desired state is "started".
- do_start();
+ service_set->addToStartQueue(this);
}
else {
if (socket_fd != -1) {
}
desired_state = ServiceState::STARTED;
- do_start();
+ service_set->addToStartQueue(this);
}
void ServiceRecord::do_start() noexcept
pinned_started = false;
if (desired_state == ServiceState::STOPPED) {
do_stop();
+ service_set->processQueues(false);
}
}
if (pinned_stopped) {
pinned_stopped = false;
if (desired_state == ServiceState::STARTED) {
do_start();
+ service_set->processQueues(true);
}
}
}