mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
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.
This commit is contained in:
parent
b91fc2dc3c
commit
80882ac6dd
@ -720,6 +720,8 @@ void wallet2::refresh(uint64_t start_height, uint64_t & blocks_fetched, bool& re
|
|||||||
catch (const std::exception&)
|
catch (const std::exception&)
|
||||||
{
|
{
|
||||||
blocks_fetched += added_blocks;
|
blocks_fetched += added_blocks;
|
||||||
|
if (pull_thread.joinable())
|
||||||
|
pull_thread.join();
|
||||||
if(try_count < 3)
|
if(try_count < 3)
|
||||||
{
|
{
|
||||||
LOG_PRINT_L1("Another try pull_blocks (try_count=" << try_count << ")...");
|
LOG_PRINT_L1("Another try pull_blocks (try_count=" << try_count << ")...");
|
||||||
|
Loading…
Reference in New Issue
Block a user