mirror of
https://github.com/XRPLF/clio.git
synced 2026-04-29 15:37:53 +00:00
General purpose function to retry on database timeout
This commit is contained in:
@@ -232,8 +232,11 @@ SubscriptionManager::pubTransaction(
|
||||
auto amount = tx->getFieldAmount(ripple::sfTakerGets);
|
||||
if (account != amount.issue().account)
|
||||
{
|
||||
auto ownerFunds =
|
||||
RPC::accountFunds(*backend_, lgrInfo.seq, amount, account);
|
||||
auto ownerFunds = Backend::retryOnTimeout([&]() {
|
||||
return RPC::accountFunds(
|
||||
*backend_, lgrInfo.seq, amount, account);
|
||||
});
|
||||
|
||||
pubObj["transaction"].as_object()["owner_funds"] =
|
||||
ownerFunds.getText();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user