mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-22 12:45:52 +00:00
General purpose function to retry on database timeout
This commit is contained in:
@@ -27,17 +27,7 @@ std::optional<LedgerRange>
|
||||
BackendInterface::hardFetchLedgerRangeNoThrow() const
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(debug) << __func__;
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
return hardFetchLedgerRange();
|
||||
}
|
||||
catch (DatabaseTimeout& t)
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
return retryOnTimeout([&]() { return hardFetchLedgerRange(); });
|
||||
}
|
||||
// *** state data methods
|
||||
std::optional<Blob>
|
||||
|
||||
Reference in New Issue
Block a user