event/Loop: set the uring_initialized flag

Don't attempt to initialize the io_uring subsystem more than once.
This commit is contained in:
Max Kellermann 2020-10-06 18:58:42 +02:00
parent 6682cf749f
commit ca0179b2a9

View File

@ -55,6 +55,7 @@ Uring::Queue *
EventLoop::GetUring() noexcept
{
if (!uring_initialized) {
uring_initialized = true;
try {
uring = std::make_unique<Uring::Manager>(*this);
} catch (...) {