mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-28 23:55:52 +00:00
fix accountTx ref counting
This commit is contained in:
@@ -241,7 +241,9 @@ flatMapWriteAccountTxCallback(CassFuture* fut, void* cbData)
|
||||
backend.throttleCv_.notify_all();
|
||||
if (backend.numRequestsOutstanding_ == 0)
|
||||
backend.syncCv_.notify_all();
|
||||
delete &requestParams;
|
||||
int remaining = --requestParams.refs;
|
||||
if (remaining == 0)
|
||||
delete &requestParams;
|
||||
}
|
||||
}
|
||||
void
|
||||
|
||||
@@ -1378,11 +1378,12 @@ public:
|
||||
AccountTransactionsData data;
|
||||
|
||||
uint32_t currentRetries = 0;
|
||||
std::atomic<int> refs;
|
||||
|
||||
WriteAccountTxCallbackData(
|
||||
CassandraFlatMapBackend const* f,
|
||||
AccountTransactionsData&& data)
|
||||
: backend(f), data(std::move(data))
|
||||
: backend(f), data(std::move(data)), refs(data.accounts.size())
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user