From 49b169ec3654a27b557b3fd82c9694bb6965b033 Mon Sep 17 00:00:00 2001 From: Russell Hancox Date: Wed, 8 Apr 2015 14:22:24 -0400 Subject: [PATCH] SNTFileWatcher: unset source event handler correctly --- Source/common/SNTFileWatcher.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/common/SNTFileWatcher.m b/Source/common/SNTFileWatcher.m index 3d372ba68..300cfb6c0 100644 --- a/Source/common/SNTFileWatcher.m +++ b/Source/common/SNTFileWatcher.m @@ -90,7 +90,7 @@ - (void)stopWatchingFile { if (!self.monitoringSource) return; int fd = (int)dispatch_source_get_handle(self.monitoringSource); - dispatch_source_set_event_handler(self.monitoringSource, NULL); + dispatch_source_set_event_handler_f(self.monitoringSource, NULL); dispatch_source_set_cancel_handler(self.monitoringSource, ^{ close(fd); });