event/Loop: pass SocketEvent& to AbandonFD()

This commit is contained in:
Max Kellermann
2020-10-28 14:58:23 +01:00
parent 46418d0f2d
commit 65a1c4a016
3 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -44,7 +44,7 @@ SocketEvent::Close() noexcept
return;
if (std::exchange(scheduled_flags, 0) != 0)
loop.AbandonFD(fd.Get());
loop.AbandonFD(*this);
fd.Close();
}
@@ -52,7 +52,7 @@ void
SocketEvent::Abandon() noexcept
{
if (std::exchange(scheduled_flags, 0) != 0)
loop.AbandonFD(fd.Get());
loop.AbandonFD(*this);
fd = SocketDescriptor::Undefined();
}