forked from Mirrors/privacore-open-source-search-engine
Stop statistics thread when shutting down gracefully
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user