Skip to content

Commit

Permalink
SNTFileWatcher: unset source event handler correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
russellhancox committed Apr 8, 2015
1 parent 41d1d7e commit 49b169e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/common/SNTFileWatcher.m
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit 49b169e

Please sign in to comment.