From d3deb39a483d9cdf81c1e45dc9474cd30a7182ef Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Mon, 17 Dec 2012 20:45:15 +0000 Subject: - Disable connection muxing on OS X versions lower than 10.7, to speed up connections, improving Issue #1457 - Fix a warning left over from changes in r3931 --- Source/SPSSHTunnel.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Source/SPSSHTunnel.m') diff --git a/Source/SPSSHTunnel.m b/Source/SPSSHTunnel.m index 60a8cf84..448325de 100644 --- a/Source/SPSSHTunnel.m +++ b/Source/SPSSHTunnel.m @@ -58,6 +58,8 @@ if (!theHost || !targetPort || !targetHost) return nil; if ((self = [super init])) { + SInt32 systemVersion = 0; + Gestalt(gestaltSystemVersion, &systemVersion); // Store the connection settings as appropriate sshHost = [[NSString alloc] initWithString:theHost]; @@ -69,11 +71,13 @@ delegate = nil; stateChangeSelector = nil; lastError = nil; - connectionMuxingEnabled = YES; debugMessages = [[NSMutableArray alloc] init]; debugMessagesLock = [[NSLock alloc] init]; answerAvailableLock = [[NSLock alloc] init]; - + + // Enable connection muxing on 10.7+, as 10.6 has problems with muxing (see Issue #1457) + connectionMuxingEnabled = (systemVersion >= 0x1070); + // Set up a connection for use by the tunnel process tunnelConnectionName = [[NSString alloc] initWithFormat:@"SequelPro-%lu", (unsigned long)[[NSString stringWithFormat:@"%f", [[NSDate date] timeIntervalSince1970]] hash]]; tunnelConnectionVerifyHash = [[NSString alloc] initWithFormat:@"%lu", (unsigned long)[[NSString stringWithFormat:@"%f-seeded", [[NSDate date] timeIntervalSince1970]] hash]]; -- cgit v1.2.3