From 13f8a912e3e43338ed7388357e5ef7f1b9b15f42 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 11 Jan 2021 20:14:18 +0100 Subject: [PATCH] event/Loop: simplify wake_event initializer --- src/event/Loop.cxx | 3 --- src/event/Loop.hxx | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/event/Loop.cxx b/src/event/Loop.cxx index 23408784c..c50727c3a 100644 --- a/src/event/Loop.cxx +++ b/src/event/Loop.cxx @@ -56,9 +56,6 @@ EventLoop::EventLoop( alive(!_thread.IsNull()) #endif { -#ifdef HAVE_THREADED_EVENT_LOOP - wake_event.Open(wake_fd.GetSocket()); -#endif } EventLoop::~EventLoop() noexcept diff --git a/src/event/Loop.hxx b/src/event/Loop.hxx index 584dd17c3..5a936d03f 100644 --- a/src/event/Loop.hxx +++ b/src/event/Loop.hxx @@ -63,7 +63,7 @@ class EventLoop final { #ifdef HAVE_THREADED_EVENT_LOOP WakeFD wake_fd; - SocketEvent wake_event{*this, BIND_THIS_METHOD(OnSocketReady)}; + SocketEvent wake_event{*this, BIND_THIS_METHOD(OnSocketReady), wake_fd.GetSocket()}; #endif struct TimerCompare {