mirror of
https://github.com/vtnerd/monero-lws.git
synced 2024-11-17 09:47:38 +00:00
Fix ZeroMQ resend bug in scanner loop
This commit is contained in:
parent
dbbdee6fd4
commit
346732014a
1 changed files with 5 additions and 9 deletions
|
@ -367,15 +367,11 @@ namespace lws
|
|||
auto resp = client.get_message(block_rpc_timeout);
|
||||
if (!resp)
|
||||
{
|
||||
if (resp.matches(std::errc::interrupted))
|
||||
return; // a signal was sent over ZMQ
|
||||
if (resp.matches(std::errc::timed_out))
|
||||
{
|
||||
MWARNING("Block retrieval timeout, retrying");
|
||||
if (!send(client, block_request.clone()))
|
||||
return;
|
||||
continue; // to next get_blocks_fast read
|
||||
}
|
||||
const bool timeout = resp.matches(std::errc::timed_out);
|
||||
if (timeout)
|
||||
MWARNING("Block retrieval timeout, resetting scanner");
|
||||
if (timeout || resp.matches(std::errc::interrupted))
|
||||
return;
|
||||
MONERO_THROW(resp.error(), "Failed to retrieve blocks from daemon");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue