event/SocketEvent: move Abandon() up
This commit is contained in:
parent
caa2611ad5
commit
8849b9b62c
@ -48,6 +48,15 @@ SocketEvent::Close() noexcept
|
||||
fd.Close();
|
||||
}
|
||||
|
||||
void
|
||||
SocketEvent::Abandon() noexcept
|
||||
{
|
||||
if (std::exchange(scheduled_flags, 0) != 0)
|
||||
loop.AbandonFD(fd.Get());
|
||||
|
||||
fd = SocketDescriptor::Undefined();
|
||||
}
|
||||
|
||||
bool
|
||||
SocketEvent::Schedule(unsigned flags) noexcept
|
||||
{
|
||||
@ -85,15 +94,6 @@ SocketEvent::Schedule(unsigned flags) noexcept
|
||||
return success;
|
||||
}
|
||||
|
||||
void
|
||||
SocketEvent::Abandon() noexcept
|
||||
{
|
||||
if (std::exchange(scheduled_flags, 0) != 0)
|
||||
loop.AbandonFD(fd.Get());
|
||||
|
||||
fd = SocketDescriptor::Undefined();
|
||||
}
|
||||
|
||||
void
|
||||
SocketEvent::Dispatch() noexcept
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user