event/SocketEvent: allow Close() without socket

This commit is contained in:
Max Kellermann
2020-10-14 16:23:13 +02:00
parent 7fc04fd5cd
commit 9f013f7de4
2 changed files with 4 additions and 2 deletions
+3
View File
@@ -50,6 +50,9 @@ SocketEvent::Steal() noexcept
void
SocketEvent::Close() noexcept
{
if (!fd.IsDefined())
return;
Steal().Close();
}