Commit 9e8f4d47 authored by Allison Karlitskaya's avatar Allison Karlitskaya Committed by Matthias Clasen
Browse files

kqueue: add a bit of extra paranoia on cancel

Cancellation of GPollFileMonitor is now handled correctly (in the sense
that no further signals will follow) but let's be extra paranoid and
disconnect our handler anyway, for good measure.
parent a367921d
...@@ -186,7 +186,10 @@ g_kqueue_file_monitor_cancel (GFileMonitor *monitor) ...@@ -186,7 +186,10 @@ g_kqueue_file_monitor_cancel (GFileMonitor *monitor)
kqueue_monitor->sub = NULL; kqueue_monitor->sub = NULL;
} }
else if (kqueue_monitor->fallback) else if (kqueue_monitor->fallback)
g_file_monitor_cancel (kqueue_monitor->fallback); {
g_signal_handlers_disconnect_by_func (kqueue_monitor->fallback, _fallback_callback, kqueue_monitor);
g_file_monitor_cancel (kqueue_monitor->fallback);
if (G_FILE_MONITOR_CLASS (g_kqueue_file_monitor_parent_class)->cancel) if (G_FILE_MONITOR_CLASS (g_kqueue_file_monitor_parent_class)->cancel)
(*G_FILE_MONITOR_CLASS (g_kqueue_file_monitor_parent_class)->cancel) (monitor); (*G_FILE_MONITOR_CLASS (g_kqueue_file_monitor_parent_class)->cancel) (monitor);
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