Bugfix: Don't use eventfdDesc after stop()

We call stop() inside the assembleFrameReq3, so when it returns,
the eventfdDesc should be destroyed. Don't allow a possibly stale
eventfdDesc obj to permit us to re-arm the eventfdDesc read_some
call.
This commit is contained in:
2025-11-08 23:09:14 -04:00
parent a0ab5538df
commit 72a3415553
@@ -587,17 +587,15 @@ void IoUringAssemblyEngine::onEventfdRead(
}
}
if (!isAssembling) { return; }
// Re-arm the eventfd read for next CQE notification
// Only re-arm if assembly is still active (stop() hasn't been called)
if (eventfdDesc && eventfdFd >= 0)
{
eventfdDesc->async_read_some(
boost::asio::buffer(&eventfd_value, sizeof(eventfd_value)),
std::bind(
&IoUringAssemblyEngine::onEventfdRead, this,
std::placeholders::_1,
std::placeholders::_2));
}
eventfdDesc->async_read_some(
boost::asio::buffer(&eventfd_value, sizeof(eventfd_value)),
std::bind(
&IoUringAssemblyEngine::onEventfdRead, this,
std::placeholders::_1,
std::placeholders::_2));
}
void IoUringAssemblyEngine::cancelIncompleteAndFillDummies()