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