Commit 7f24f988 authored by Bartek Wrona's avatar Bartek Wrona

Fixes to prevent crashes at plugin shutdown time.

parent 4cc194e8
......@@ -602,10 +602,13 @@ public:
{
chain::util::disconnect_signal(_on_post_apply_operation_con);
chain::util::disconnect_signal(_on_irreversible_block_conn);
flushStorage();
cleanupColumnHandles();
_storage->Close();
_storage.reset();
if(_storage)
{
flushStorage();
cleanupColumnHandles();
_storage->Close();
_storage.reset();
}
}
private:
......@@ -623,7 +626,8 @@ private:
void cleanupColumnHandles()
{
cleanupColumnHandles(_storage.get());
if(_storage)
cleanupColumnHandles(_storage.get());
}
void cleanupColumnHandles(::rocksdb::DB* db)
......
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