Fix #95 CLI wallet crash on exit

This commit is contained in:
Eric Frias 2015-06-25 17:34:01 -04:00
parent c80e0c09ba
commit 0936f9b5f2

View file

@ -311,9 +311,20 @@ public:
}, {dynamic_global_property_id_type()} ); }, {dynamic_global_property_id_type()} );
} }
virtual ~wallet_api_impl() virtual ~wallet_api_impl()
{
try
{ {
_remote_db->cancel_all_subscriptions(); _remote_db->cancel_all_subscriptions();
} }
catch (const fc::exception& e)
{
// Right now the wallet_api has no way of knowing if the connection to the
// witness has already disconnected (via the witness node exiting first).
// If it has exited, cancel_all_subscriptsions() will throw and there's
// nothing we can do about it.
// dlog("Caught exception ${e} while canceling database subscriptions", ("e", e));
}
}
void encrypt_keys() void encrypt_keys()
{ {