store: stop indexer in dtor

This commit is contained in:
Dirk-Jan C. Binnema 2022-05-18 18:07:19 +03:00
parent 9b5f780975
commit 0be54119d8
1 changed files with 5 additions and 2 deletions

View File

@ -101,8 +101,11 @@ struct Store::Private {
contacts_cache_{"", properties_.personal_addresses} {
}
~Private()
try {
~Private() try {
if (indexer_) // do this here, since it may call back.
indexer_->stop();
g_debug("closing store @ %s", properties_.database_path.c_str());
if (!read_only_) {
transaction_maybe_commit(true /*force*/);