aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/event/ServerSocket.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/event/ServerSocket.cxx b/src/event/ServerSocket.cxx
index 8536774dc..119bfe1d7 100644
--- a/src/event/ServerSocket.cxx
+++ b/src/event/ServerSocket.cxx
@@ -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 &