1
0
Fork 0

fix agency shutdown

This commit is contained in:
jsteemann 2016-08-25 14:04:11 +02:00
parent 85db0a062a
commit 667dc8af49
2 changed files with 12 additions and 3 deletions

View File

@ -229,8 +229,16 @@ void AgencyFeature::start() {
_agent->load();
}
void AgencyFeature::unprepare() {
void AgencyFeature::beginShutdown() {
if (!isEnabled()) {
return;
}
// pass shutdown event to _agent so it can notify all its sub-threads
_agent->beginShutdown();
}
void AgencyFeature::unprepare() {
if (!isEnabled()) {
return;
}

View File

@ -20,8 +20,8 @@
/// @author Kaveh Vahedipour
////////////////////////////////////////////////////////////////////////////////
#ifndef ARANGOD_AGENCY_APPLICATION_AGENCY_H
#define ARANGOD_AGENCY_APPLICATION_AGENCY_H 1
#ifndef ARANGOD_AGENCY_AGENCY_FEATURE_H
#define ARANGOD_AGENCY_AGENCY_FEATURE_H 1
#include "ApplicationFeatures/ApplicationFeature.h"
@ -40,6 +40,7 @@ class AgencyFeature : virtual public application_features::ApplicationFeature {
void validateOptions(std::shared_ptr<options::ProgramOptions>) override final;
void prepare() override final;
void start() override final;
void beginShutdown() override final;
void unprepare() override final;
private: