aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-06-25 00:51:20 +0000
committerrowanbeentje <rowan@beent.je>2009-06-25 00:51:20 +0000
commit78eeb50b872b669f86c50a103ec351038fcf55a8 (patch)
tree45d7728d61992bf26ff8a3dbbc46a5211b37fa1f /Source
parent08b7326123f2c36116904ab68b390ae594874b32 (diff)
downloadsequelpro-78eeb50b872b669f86c50a103ec351038fcf55a8.tar.gz
sequelpro-78eeb50b872b669f86c50a103ec351038fcf55a8.tar.bz2
sequelpro-78eeb50b872b669f86c50a103ec351038fcf55a8.zip
- Set an appropriate error message if the MySQL connection could not be established because the required tunnel isn't available. Resolves Issue #310.
Diffstat (limited to 'Source')
-rw-r--r--Source/CMMCPConnection.m6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/CMMCPConnection.m b/Source/CMMCPConnection.m
index 90b915fe..afba40a9 100644
--- a/Source/CMMCPConnection.m
+++ b/Source/CMMCPConnection.m
@@ -466,7 +466,11 @@ static void forcePingTimeout(int signalNumber);
}
}
} else if (parentWindow) {
- [self setLastErrorMessage:nil];
+ if (connectionTunnel && [connectionTunnel state] != SPSSH_STATE_CONNECTED) {
+ [self setLastErrorMessage:@"(Could not connect because the Sequel Pro SSH Tunnel could not be reestablished)"];
+ } else {
+ [self setLastErrorMessage:nil];
+ }
// If the connection was not successfully established, ask how to proceed.
[NSApp beginSheet:connectionErrorDialog modalForWindow:parentWindow modalDelegate:self didEndSelector:nil contextInfo:nil];