diff --git a/PBWebHistoryController.m b/PBWebHistoryController.m index e3467c0..08279cf 100644 --- a/PBWebHistoryController.m +++ b/PBWebHistoryController.m @@ -67,13 +67,15 @@ NSFileHandle *handle = [repository handleForArguments:taskArguments]; NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; // Remove notification, in case we have another one running - [nc removeObserver:self]; + [nc removeObserver:self name:NSFileHandleReadToEndOfFileCompletionNotification object:nil]; [nc addObserver:self selector:@selector(commitDetailsLoaded:) name:NSFileHandleReadToEndOfFileCompletionNotification object:handle]; [handle readToEndOfFileInBackgroundAndNotify]; } - (void)commitDetailsLoaded:(NSNotification *)notification { + [[NSNotificationCenter defaultCenter] removeObserver:self name:NSFileHandleReadToEndOfFileCompletionNotification object:nil]; + NSData *data = [[notification userInfo] valueForKey:NSFileHandleNotificationDataItem]; if (!data) return;