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:
@@ -587,17 +587,15 @@ void IoUringAssemblyEngine::onEventfdRead(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isAssembling) { return; }
|
||||||
|
|
||||||
// Re-arm the eventfd read for next CQE notification
|
// Re-arm the eventfd read for next CQE notification
|
||||||
// Only re-arm if assembly is still active (stop() hasn't been called)
|
eventfdDesc->async_read_some(
|
||||||
if (eventfdDesc && eventfdFd >= 0)
|
boost::asio::buffer(&eventfd_value, sizeof(eventfd_value)),
|
||||||
{
|
std::bind(
|
||||||
eventfdDesc->async_read_some(
|
&IoUringAssemblyEngine::onEventfdRead, this,
|
||||||
boost::asio::buffer(&eventfd_value, sizeof(eventfd_value)),
|
std::placeholders::_1,
|
||||||
std::bind(
|
std::placeholders::_2));
|
||||||
&IoUringAssemblyEngine::onEventfdRead, this,
|
|
||||||
std::placeholders::_1,
|
|
||||||
std::placeholders::_2));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IoUringAssemblyEngine::cancelIncompleteAndFillDummies()
|
void IoUringAssemblyEngine::cancelIncompleteAndFillDummies()
|
||||||
|
|||||||
Reference in New Issue
Block a user