aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Resources/Plists/PreferenceDefaults.plist2
-rw-r--r--Source/SPConnectionHandler.m7
-rw-r--r--Source/SPConstants.h1
-rw-r--r--Source/SPConstants.m1
-rw-r--r--Source/SPSSHTunnel.h1
-rw-r--r--Source/SPSSHTunnel.m8
6 files changed, 9 insertions, 11 deletions
diff --git a/Resources/Plists/PreferenceDefaults.plist b/Resources/Plists/PreferenceDefaults.plist
index 7ac9c3d7..c77ec08e 100644
--- a/Resources/Plists/PreferenceDefaults.plist
+++ b/Resources/Plists/PreferenceDefaults.plist
@@ -175,6 +175,8 @@
<true/>
<key>SQLExportUseCompression</key>
<false/>
+ <key>SSHMultiplexingEnabled</key>
+ <false/>
<key>TableInformationPanelCollapsed</key>
<false/>
<key>TableRowCountCheapLookupSizeBoundary</key>
diff --git a/Source/SPConnectionHandler.m b/Source/SPConnectionHandler.m
index ce42c17b..77cfe083 100644
--- a/Source/SPConnectionHandler.m
+++ b/Source/SPConnectionHandler.m
@@ -380,13 +380,6 @@ static NSString *SPLocalhostAddress = @"127.0.0.1";
if (newState == SPMySQLProxyIdle) {
- // If the connection closed unexpectedly, and muxing was enabled, disable muxing an re-try.
- if ([theTunnel taskExitedUnexpectedly] && [theTunnel connectionMuxingEnabled]) {
- [theTunnel setConnectionMuxingEnabled:NO];
- [theTunnel connect];
- return;
- }
-
#ifndef SP_CODA
[dbDocument setTitlebarStatus:NSLocalizedString(@"SSH Disconnected", @"SSH disconnected titlebar marker")];
#endif
diff --git a/Source/SPConstants.h b/Source/SPConstants.h
index 91e2492f..c321d1fa 100644
--- a/Source/SPConstants.h
+++ b/Source/SPConstants.h
@@ -418,6 +418,7 @@ extern NSString *SPBundleDeletedDefaultBundlesKey;
extern NSString *SPHiddenKeyFileVisibilityKey;
extern NSString *SPSelectionDetailTypeIndexed;
extern NSString *SPSelectionDetailTypePrimaryKeyed;
+extern NSString *SPSSHEnableMuxingPreference;
// URLs
extern NSString *SPDonationsURL;
diff --git a/Source/SPConstants.m b/Source/SPConstants.m
index 3ac465fb..cad10d95 100644
--- a/Source/SPConstants.m
+++ b/Source/SPConstants.m
@@ -224,6 +224,7 @@ NSString *SPBundleDeletedDefaultBundlesKey = @"deletedDefaultBundles";
NSString *SPHiddenKeyFileVisibilityKey = @"KeySelectionHiddenFilesVisibility";
NSString *SPSelectionDetailTypeIndexed = @"SelectionDetailTypeNSIndexSet";
NSString *SPSelectionDetailTypePrimaryKeyed = @"SelectionDetailTypePrimaryKeyedDetails";
+NSString *SPSSHEnableMuxingPreference = @"SSHMultiplexingEnabled";
// URLs
NSString *SPDonationsURL = @"http://www.sequelpro.com/donate/";
diff --git a/Source/SPSSHTunnel.h b/Source/SPSSHTunnel.h
index 25a98cc4..08c39c07 100644
--- a/Source/SPSSHTunnel.h
+++ b/Source/SPSSHTunnel.h
@@ -82,7 +82,6 @@
}
@property (readonly) BOOL passwordPromptCancelled;
-@property (readwrite) BOOL connectionMuxingEnabled;
@property (readonly) BOOL taskExitedUnexpectedly;
- (id)initToHost:(NSString *)theHost port:(NSInteger)thePort login:(NSString *)theLogin tunnellingToPort:(NSInteger)targetPort onHost:(NSString *)targetHost;
diff --git a/Source/SPSSHTunnel.m b/Source/SPSSHTunnel.m
index 448325de..536f2f43 100644
--- a/Source/SPSSHTunnel.m
+++ b/Source/SPSSHTunnel.m
@@ -44,7 +44,6 @@
@implementation SPSSHTunnel
@synthesize passwordPromptCancelled;
-@synthesize connectionMuxingEnabled;
@synthesize taskExitedUnexpectedly;
/*
@@ -75,8 +74,9 @@
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);
+ // Enable connection muxing on 10.7+, but only if a preference is enabled; this is because
+ // muxing causes connection instability for a large number of users (see Issue #1457)
+ connectionMuxingEnabled = (systemVersion >= 0x1070) && [[NSUserDefaults standardUserDefaults] boolForKey:SPSSHEnableMuxingPreference];
// 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]];
@@ -322,6 +322,8 @@
// Ensure that the connection can be used for only tunnels, not interactive
[taskArguments addObject:@"-N"];
+ // If explicitly enabled, activate connection multiplexing - note that this can cause connection
+ // instability on some setups, so is currently disabled by default.
if (connectionMuxingEnabled) {
// Enable automatic connection muxing/sharing, for faster connections