mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-30 16:45:51 +00:00
fix accountTx ref counting
This commit is contained in:
@@ -241,7 +241,9 @@ flatMapWriteAccountTxCallback(CassFuture* fut, void* cbData)
|
|||||||
backend.throttleCv_.notify_all();
|
backend.throttleCv_.notify_all();
|
||||||
if (backend.numRequestsOutstanding_ == 0)
|
if (backend.numRequestsOutstanding_ == 0)
|
||||||
backend.syncCv_.notify_all();
|
backend.syncCv_.notify_all();
|
||||||
delete &requestParams;
|
int remaining = --requestParams.refs;
|
||||||
|
if (remaining == 0)
|
||||||
|
delete &requestParams;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -1378,11 +1378,12 @@ public:
|
|||||||
AccountTransactionsData data;
|
AccountTransactionsData data;
|
||||||
|
|
||||||
uint32_t currentRetries = 0;
|
uint32_t currentRetries = 0;
|
||||||
|
std::atomic<int> refs;
|
||||||
|
|
||||||
WriteAccountTxCallbackData(
|
WriteAccountTxCallbackData(
|
||||||
CassandraFlatMapBackend const* f,
|
CassandraFlatMapBackend const* f,
|
||||||
AccountTransactionsData&& data)
|
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