aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPSSHTunnel.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-12-17 20:45:15 +0000
committerrowanbeentje <rowan@beent.je>2012-12-17 20:45:15 +0000
commitd3deb39a483d9cdf81c1e45dc9474cd30a7182ef (patch)
treec87236f65532aa6d8badc9db2b2dbf1f4818c434 /Source/SPSSHTunnel.m
parent5a194fdff493435091e550a96d9e8ce79f1ee463 (diff)
downloadsequelpro-d3deb39a483d9cdf81c1e45dc9474cd30a7182ef.tar.gz
sequelpro-d3deb39a483d9cdf81c1e45dc9474cd30a7182ef.tar.bz2
sequelpro-d3deb39a483d9cdf81c1e45dc9474cd30a7182ef.zip
- 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
Diffstat (limited to 'Source/SPSSHTunnel.m')
-rw-r--r--Source/SPSSHTunnel.m8
1 files changed, 6 insertions, 2 deletions
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]];