From 57eaf99dc126edfff911882b6e1aee5eac0755ea Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Wed, 28 Apr 2010 23:46:27 +0000 Subject: - Fix CFRunLoopWakeUp crashes seen on 10.5.8 with SSH connections by running the run loop after disconnection to flush calls --- Source/SPSSHTunnel.m | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Source/SPSSHTunnel.m') diff --git a/Source/SPSSHTunnel.m b/Source/SPSSHTunnel.m index eeef83d2..2b7c31fb 100644 --- a/Source/SPSSHTunnel.m +++ b/Source/SPSSHTunnel.m @@ -352,6 +352,10 @@ [[NSNotificationCenter defaultCenter] removeObserver:self name:@"NSFileHandleDataAvailableNotification" object:nil]; + + // Run the run loop for a short time to ensure all task/pipe callbacks are dealt with + [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:1.0]]; + [task release], task = nil; [standardError release], standardError = nil; [taskEnvironment release], taskEnvironment = nil; -- cgit v1.2.3