clean up shutdown
This commit is contained in:
parent
e68e99ed3a
commit
efd5e96192
1 changed files with 5 additions and 0 deletions
|
|
@ -387,6 +387,9 @@ namespace detail {
|
|||
virtual bool handle_block(const graphene::net::block_message& blk_msg, bool sync_mode,
|
||||
std::vector<fc::uint160_t>& contained_transaction_message_ids) override
|
||||
{ try {
|
||||
if( !_chain_db->is_open() )
|
||||
return false;
|
||||
|
||||
auto latency = graphene::time::now() - blk_msg.block.timestamp;
|
||||
if (!sync_mode || blk_msg.block.block_num() % 10000 == 0)
|
||||
{
|
||||
|
|
@ -932,6 +935,8 @@ void application::shutdown_plugins()
|
|||
}
|
||||
void application::shutdown()
|
||||
{
|
||||
if( my->_p2p_network )
|
||||
my->_p2p_network->close();
|
||||
if( my->_chain_db )
|
||||
my->_chain_db->close();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue