diff --git a/arangod/Agency/AgencyFeature.cpp b/arangod/Agency/AgencyFeature.cpp index fce14c3755..bc3c12266a 100644 --- a/arangod/Agency/AgencyFeature.cpp +++ b/arangod/Agency/AgencyFeature.cpp @@ -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; } diff --git a/arangod/Agency/AgencyFeature.h b/arangod/Agency/AgencyFeature.h index cee475eba7..17a7b373e0 100644 --- a/arangod/Agency/AgencyFeature.h +++ b/arangod/Agency/AgencyFeature.h @@ -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) override final; void prepare() override final; void start() override final; + void beginShutdown() override final; void unprepare() override final; private: