Skip to content

Commit adb9df3

Browse files
committed
fixup! refactor: acquireAsync will dispatch the job, not the other way around
1 parent 1ef617c commit adb9df3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/xrpld/app/ledger/detail/InboundLedgers.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,12 @@ class InboundLedgersImp : public InboundLedgers
220220
std::uint32_t seq,
221221
InboundLedger::Reason reason) override
222222
{
223-
if (CanProcess const check{acquiresMutex_, pendingAcquires_, hash})
223+
if (auto check = std::make_shared<CanProcess const>(
224+
acquiresMutex_, pendingAcquires_, hash);
225+
*check)
224226
{
225227
app_.getJobQueue().addJob(
226-
type,
227-
name,
228-
[check = std::move(check), name, hash, seq, reason, this]() {
228+
type, name, [check, name, hash, seq, reason, this]() {
229229
JLOG(j_.debug())
230230
<< "JOB acquireAsync " << name << " started ";
231231
try

0 commit comments

Comments
 (0)