From 2fa56a6c69696535980b57b3fa528efc5a4ab6db Mon Sep 17 00:00:00 2001 From: Aleksandr Starun Date: Sat, 29 Dec 2018 17:49:42 +0300 Subject: [PATCH] #240 Fixed restart node --- ui/model/node_model.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/ui/model/node_model.cpp b/ui/model/node_model.cpp index b58b01949..3dd194f17 100644 --- a/ui/model/node_model.cpp +++ b/ui/model/node_model.cpp @@ -104,14 +104,20 @@ void NodeModel::run() } if (!m_shouldTerminateModel) - runLocalNode(); + { + try + { + m_shouldStartNode = false; + runLocalNode(); + } + catch (const runtime_error& ex) + { + LOG_ERROR() << ex.what(); + AppModel::getInstance()->getMessages().addMessage(tr("Failed to start node. Please check your node configuration")); + } + } } } - catch (const runtime_error& ex) - { - LOG_ERROR() << ex.what(); - AppModel::getInstance()->getMessages().addMessage(tr("Failed to start node. Please check your node configuration")); - } catch (...) { LOG_ERROR() << "Unhandled exception";