From 793962c5b86cd063036a2d28907b0b33012483e1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 6 Jan 2014 18:02:57 +0100 Subject: event/SocketMonitor: don't close the socket automatically Users now have to call Close() explicitly. This simplifies using the class, as most users have automatic socket management already, and Steal() had to be used often. --- src/event/ServerSocket.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/event/ServerSocket.cxx') diff --git a/src/event/ServerSocket.cxx b/src/event/ServerSocket.cxx index a05d7bde2..64e38776f 100644 --- a/src/event/ServerSocket.cxx +++ b/src/event/ServerSocket.cxx @@ -90,6 +90,9 @@ public: ~OneServerSocket() { g_free(address); + + if (IsDefined()) + Close(); } unsigned GetSerial() const { -- cgit v1.2.3