Update Context.cpp

This commit is contained in:
Alexander Tokmakov 2024-03-19 22:40:00 +01:00 committed by GitHub
parent 1913466da4
commit 7275caf5bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -566,7 +566,8 @@ struct ContextSharedPart : boost::noncopyable
std::lock_guard lock(mutex);
delete_async_insert_queue = std::move(async_insert_queue);
}
delete_async_insert_queue->flushAndShutdown();
if (delete_async_insert_queue)
delete_async_insert_queue->flushAndShutdown();
/// Stop periodic reloading of the configuration files.
/// This must be done first because otherwise the reloading may pass a changed config