mirror of
https://codeberg.org/wownero/wownero-lws
synced 2026-01-09 23:25:16 -08:00
Fix ZeroMQ resend bug in scanner loop
This commit is contained in:
@@ -371,15 +371,11 @@ namespace lws
|
|||||||
auto resp = client.get_message(block_rpc_timeout);
|
auto resp = client.get_message(block_rpc_timeout);
|
||||||
if (!resp)
|
if (!resp)
|
||||||
{
|
{
|
||||||
if (resp.matches(std::errc::interrupted))
|
const bool timeout = resp.matches(std::errc::timed_out);
|
||||||
return; // a signal was sent over ZMQ
|
if (timeout)
|
||||||
if (resp.matches(std::errc::timed_out))
|
MWARNING("Block retrieval timeout, resetting scanner");
|
||||||
{
|
if (timeout || resp.matches(std::errc::interrupted))
|
||||||
MWARNING("Block retrieval timeout, retrying");
|
return;
|
||||||
if (!send(client, block_request.clone()))
|
|
||||||
return;
|
|
||||||
continue; // to next get_blocks_fast read
|
|
||||||
}
|
|
||||||
MONERO_THROW(resp.error(), "Failed to retrieve blocks from daemon");
|
MONERO_THROW(resp.error(), "Failed to retrieve blocks from daemon");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user