diff options
| author | Riccardo Spagni <ric@spagni.net> | 2016-01-31 15:20:47 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2016-01-31 15:20:47 +0200 |
| commit | 58f890652e86039e98dff2d48d217c9ea9e84eca (patch) | |
| tree | deb58a24d5202473ab5e8f43a80ad534ed7c8ad9 /src/wallet/wallet2.cpp | |
| parent | 39d73d2a27730e6a5844c259d81a0ed9d4ee3000 (diff) | |
| parent | 2cf8b32229966094570c564d03c66c2603b631cc (diff) | |
| download | monzero-core-58f890652e86039e98dff2d48d217c9ea9e84eca.tar.gz monzero-core-58f890652e86039e98dff2d48d217c9ea9e84eca.tar.xz monzero-core-58f890652e86039e98dff2d48d217c9ea9e84eca.zip | |
Merge pull request #632
2cf8b32 wallet: guard against exception in process_blocks (moneromooo-monero)
Diffstat (limited to 'src/wallet/wallet2.cpp')
| -rw-r--r-- | src/wallet/wallet2.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 4758e13d0..28bc35feb 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -753,7 +753,15 @@ void wallet2::refresh(uint64_t start_height, uint64_t & blocks_fetched, bool& re bool error = false; pull_thread = std::thread([&]{pull_next_blocks(start_height, next_blocks_start_height, short_chain_history, blocks, next_blocks, error);}); - process_blocks(blocks_start_height, blocks, added_blocks); + try + { + process_blocks(blocks_start_height, blocks, added_blocks); + } + catch (...) + { + pull_thread.join(); + throw; + } blocks_fetched += added_blocks; pull_thread.join(); if(!added_blocks) |
