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/InotifySource.hxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/InotifySource.hxx') diff --git a/src/InotifySource.hxx b/src/InotifySource.hxx index 026b156e6..e2ce9301e 100644 --- a/src/InotifySource.hxx +++ b/src/InotifySource.hxx @@ -38,6 +38,10 @@ class InotifySource final : private SocketMonitor { mpd_inotify_callback_t callback, void *ctx, int fd); public: + ~InotifySource() { + Close(); + } + /** * Creates a new inotify source and registers it in the GLib main * loop. -- cgit v1.2.3