From a79aaad9ab67296e0b0e93cba4b1f1984bcc0a14 Mon Sep 17 00:00:00 2001 From: Jari Sundell Date: Fri, 19 Jun 2026 15:52:27 +0900 Subject: [PATCH] Clean up comments in InputEvent methods Removed commented-out code regarding error handling for stdin and event processing. --- src/input/input_event.cc | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/input/input_event.cc b/src/input/input_event.cc index 67f1518c..530e0ca4 100644 --- a/src/input/input_event.cc +++ b/src/input/input_event.cc @@ -13,18 +13,11 @@ void InputEvent::insert() { torrent::this_thread::poll()->open(this); torrent::this_thread::poll()->insert_read(this); - // EPOLLERR/EPOLLHUP is always delivered by epoll regardless of registration; - // register for it so a controlling-terminal/pty hangup on stdin is dispatched - // to event_error() instead of aborting the whole client (see event_error()). torrent::this_thread::poll()->insert_error(this); } void InputEvent::remove() { - // The file descriptor doubles as the open-state guard, mirroring SCgiTask. - // event_error() may already have dropped stdin from the poll set and cleared - // the fd; the shutdown path (Control::cleanup) still calls remove(), and a - // second remove_and_close() would throw "event not found" via event_mask(). if (!is_open()) return; @@ -46,12 +39,6 @@ InputEvent::event_write() { void InputEvent::event_error() { - // The controlling terminal/pty hung up (EPOLLERR on stdin). Drop stdin from - // the poll set instead of letting Poll::process() throw an internal_error and - // kill the client -- a regression introduced with the 0.16.13 callback/poll - // rework. rtorrent keeps running with no keyboard input. Once removed the - // event is out of the poll table, so no further event_error() is dispatched - // to it; clearing the fd lets the shutdown remove() no-op. torrent::this_thread::poll()->remove_and_close(this); set_file_descriptor(-1); }