From 213c72be8a86cf51a019954b6835ec5eec1801ee Mon Sep 17 00:00:00 2001 From: clemahieu Date: Wed, 21 Jun 2017 19:54:27 -0500 Subject: [PATCH] Keeping node alive until GUI events are complete. --- rai/rai_wallet/entry.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rai/rai_wallet/entry.cpp b/rai/rai_wallet/entry.cpp index b4100b8a..8034993a 100755 --- a/rai/rai_wallet/entry.cpp +++ b/rai/rai_wallet/entry.cpp @@ -207,6 +207,7 @@ int run_wallet (QApplication & application, int argc, char * const * argv, boost config_file.close (); if (!error) { + std::shared_ptr node; std::shared_ptr gui; rai::set_application_icon (application); std::thread node_thread ([&] () @@ -215,7 +216,7 @@ int run_wallet (QApplication & application, int argc, char * const * argv, boost rai::work_pool work (config.node.work_threads, rai::opencl_work::create (config.opencl_enable, config.opencl, config.node.logging)); rai::alarm alarm (service); rai::node_init init; - auto node (std::make_shared (init, service, data_path, alarm, config.node, work)); + node = std::make_shared (init, service, data_path, alarm, config.node, work); if (!init.error ()) { auto wallet (node->wallets.open (config.wallet));