Commit cea8db7e authored by Max Kellermann's avatar Max Kellermann

event/SocketEvent: add comment

parent b56c0e69
......@@ -44,6 +44,9 @@ SocketEvent::Close() noexcept
if (!fd.IsDefined())
return;
/* closing the socket automatically unregisters it from epoll,
so we can omit the epoll_ctl(EPOLL_CTL_DEL) call and save
one system call */
if (std::exchange(scheduled_flags, 0) != 0)
loop.AbandonFD(*this);
fd.Close();
......
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