aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPConnectionHandler.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-10-30 22:30:47 +0000
committerrowanbeentje <rowan@beent.je>2012-10-30 22:30:47 +0000
commitbd51b74145153281edddbc6f2f5d165b3249dc41 (patch)
tree17d14774a4ad0d24e0218c62048b812b17316ad7 /Source/SPConnectionHandler.m
parente3d3ff956b73e2713b36e292744956c1e0e9b805 (diff)
downloadsequelpro-bd51b74145153281edddbc6f2f5d165b3249dc41.tar.gz
sequelpro-bd51b74145153281edddbc6f2f5d165b3249dc41.tar.bz2
sequelpro-bd51b74145153281edddbc6f2f5d165b3249dc41.zip
- If the connection exits unexpectedly when muxing, disable connection muxing and retry; this should address Issue #1457
- Add SSH command and task arguments used to the debug log
Diffstat (limited to 'Source/SPConnectionHandler.m')
-rw-r--r--Source/SPConnectionHandler.m10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/SPConnectionHandler.m b/Source/SPConnectionHandler.m
index 0634df68..d930a299 100644
--- a/Source/SPConnectionHandler.m
+++ b/Source/SPConnectionHandler.m
@@ -357,7 +357,7 @@ static NSString *SPLocalhostAddress = @"127.0.0.1";
NSInteger newState = [theTunnel state];
- // If the user cancelled the password prompt dialog
+ // If the user cancelled the password prompt dialog, continue with no further action.
if ([theTunnel passwordPromptCancelled]) {
[self _restoreConnectionInterface];
@@ -365,6 +365,14 @@ 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_REFACTOR
[dbDocument setTitlebarStatus:NSLocalizedString(@"SSH Disconnected", @"SSH disconnected titlebar marker")];
#endif