Commit ca0179b2 authored by Max Kellermann's avatar Max Kellermann

event/Loop: set the uring_initialized flag

Don't attempt to initialize the io_uring subsystem more than once.
parent 6682cf74
...@@ -55,6 +55,7 @@ Uring::Queue * ...@@ -55,6 +55,7 @@ Uring::Queue *
EventLoop::GetUring() noexcept EventLoop::GetUring() noexcept
{ {
if (!uring_initialized) { if (!uring_initialized) {
uring_initialized = true;
try { try {
uring = std::make_unique<Uring::Manager>(*this); uring = std::make_unique<Uring::Manager>(*this);
} catch (...) { } catch (...) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment