event/SocketEvent: add comment
This commit is contained in:
parent
b56c0e69e4
commit
cea8db7eaa
@ -44,6 +44,9 @@ SocketEvent::Close() noexcept
|
|||||||
if (!fd.IsDefined())
|
if (!fd.IsDefined())
|
||||||
return;
|
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)
|
if (std::exchange(scheduled_flags, 0) != 0)
|
||||||
loop.AbandonFD(*this);
|
loop.AbandonFD(*this);
|
||||||
fd.Close();
|
fd.Close();
|
||||||
|
Loading…
Reference in New Issue
Block a user