Commit 5692e20f authored by Max Kellermann's avatar Max Kellermann

event/ServerSocket: close only sockets that have been opened

Fixes assertion failure.
parent 3b3c9334
......@@ -98,6 +98,7 @@ public:
bool Open(GError **error_r);
using SocketMonitor::IsDefined;
using SocketMonitor::Close;
char *ToString() const;
......@@ -286,7 +287,8 @@ void
ServerSocket::Close()
{
for (auto &i : sockets)
i.Close();
if (i.IsDefined())
i.Close();
}
OneServerSocket &
......
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