From 78eeb50b872b669f86c50a103ec351038fcf55a8 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Thu, 25 Jun 2009 00:51:20 +0000 Subject: - Set an appropriate error message if the MySQL connection could not be established because the required tunnel isn't available. Resolves Issue #310. --- Source/CMMCPConnection.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Source') 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]; -- cgit v1.2.3