diff --git a/src/input/input_event.cc b/src/input/input_event.cc index b6126540..24390bb0 100644 --- a/src/input/input_event.cc +++ b/src/input/input_event.cc @@ -11,8 +11,7 @@ namespace input { void InputEvent::insert() { - torrent::this_thread::poll()->open(this); - torrent::this_thread::poll()->insert_read(this); + torrent::this_thread::poll()->open_and_insert_read(this); } void diff --git a/src/rpc/scgi.cc b/src/rpc/scgi.cc index 4f665547..c9035c1e 100644 --- a/src/rpc/scgi.cc +++ b/src/rpc/scgi.cc @@ -109,8 +109,7 @@ void SCgi::activate() { assert(torrent::this_thread::thread() == scgi_thread::thread()); - torrent::this_thread::poll()->open(this); - torrent::this_thread::poll()->insert_read(this); + torrent::this_thread::poll()->open_and_insert_read(this); } // TODO: This should close the fd to avoid reuse. diff --git a/src/rpc/scgi_task.cc b/src/rpc/scgi_task.cc index f9a05882..9785d158 100644 --- a/src/rpc/scgi_task.cc +++ b/src/rpc/scgi_task.cc @@ -47,8 +47,7 @@ SCgiTask::open(SCgi* parent, int fd) { // m_trusted=false into the next reuse, given that the // UNTRUSTED_CONNECTION=0 parse branch is a no-op. - torrent::this_thread::poll()->open(this); - torrent::this_thread::poll()->insert_read(this); + torrent::this_thread::poll()->open_and_insert_read(this); auto lock = std::lock_guard(m_result_mutex);