Commit aca76396 authored by Johan Ström's avatar Johan Ström

agoresolver: release timers earlier to speed up shutdown

parent 6bc89bc1
......@@ -97,7 +97,7 @@ private:
void staleFunction(const boost::system::error_code& error);
void setupApp();
void cleanupApp();
void doShutdown();
public:
AGOAPP_CONSTRUCTOR_HEAD(AgoResolver)
, inventory(Json::objectValue)
......@@ -940,11 +940,11 @@ void AgoResolver::setupApp()
staleTimer.async_wait(boost::bind(&AgoResolver::staleFunction, this, _1));
}
void AgoResolver::cleanupApp()
{
void AgoResolver::doShutdown() {
//stop timers
staleTimer.cancel();
discoveryTimer.cancel();
AgoApp::doShutdown();
}
AGOAPP_ENTRY_POINT(AgoResolver);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment