diff --git a/Source/NSConnection.m b/Source/NSConnection.m index 63d9ffe09..bc3ee10ef 100644 --- a/Source/NSConnection.m +++ b/Source/NSConnection.m @@ -367,7 +367,7 @@ static int messages_received_count; return [self rootProxyAtPort: [p autorelease]]; } -+ (void) timeout: (NSTimer*)t ++ (void) _timeout: (NSTimer*)t { NSArray *cached_locals; int i; @@ -380,6 +380,10 @@ static int messages_received_count; NSMapRemove(all_connections_local_cached, [item obj]); } } + if ([cached_locals count] == 0) { + [t invalidate]; + timer = nil; + } } - (void) addRequestMode: (NSString*)mode