diff --git a/stimBuffApis/livoxGen1/ioUringAssemblyEngine.cpp b/stimBuffApis/livoxGen1/ioUringAssemblyEngine.cpp index a4448f6..b32034c 100644 --- a/stimBuffApis/livoxGen1/ioUringAssemblyEngine.cpp +++ b/stimBuffApis/livoxGen1/ioUringAssemblyEngine.cpp @@ -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()