Stop statistics thread when shutting down gracefully

This commit is contained in:
Ivan Skytte Jørgensen
2016-11-25 13:50:06 +01:00
parent b09636aba5
commit e6211d547b

@ -15,6 +15,7 @@
#include "Doledb.h"
#include "Statsdb.h"
#include "JobScheduler.h"
#include "Statistics.h"
#include "PingServer.h"
#include "Dns.h"
#include "Repair.h"
@ -697,6 +698,8 @@ bool Process::shutdown2() {
// turn off statsdb so it does not try to add records for these writes
g_statsdb.m_disabled = true;
Statistics::finalize();
log("gb: disabling threads");
// now disable threads so we don't exit while threads are
// outstanding