aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-01-30 23:52:43 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-01-30 23:52:43 +0000
commit80882ac6dd5b119d2bd31b956fc7e02d0167e308 (patch)
tree7cc5ada275163720afb19f68da0035cb48611d9d /src
parentMerge pull request #629 (diff)
downloadmonero-80882ac6dd5b119d2bd31b956fc7e02d0167e308.tar.xz
wallet: guard against exception in process_blocks
If an exception occurs, the thread needs to be joined, or it will be deleted while still live, and terminate the process.
Diffstat (limited to '')
-rw-r--r--src/wallet/wallet2.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index d636b0e4b..f1c6c77eb 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -720,6 +720,8 @@ void wallet2::refresh(uint64_t start_height, uint64_t & blocks_fetched, bool& re
catch (const std::exception&)
{
blocks_fetched += added_blocks;
+ if (pull_thread.joinable())
+ pull_thread.join();
if(try_count < 3)
{
LOG_PRINT_L1("Another try pull_blocks (try_count=" << try_count << ")...");