diff options
author | rowanbeentje <rowan@beent.je> | 2012-05-27 22:33:26 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2012-05-27 22:33:26 +0000 |
commit | 1f0dde0452519496a3d361ad6ddb38731c350a7e (patch) | |
tree | 94a37bd6d035ebf0c3e6956ba954fdf2466d24c6 /Source/SPConnectionHandler.m | |
parent | 03f6c875ed6c240e9af2916ce92584ac6624ef87 (diff) | |
download | sequelpro-1f0dde0452519496a3d361ad6ddb38731c350a7e.tar.gz sequelpro-1f0dde0452519496a3d361ad6ddb38731c350a7e.tar.bz2 sequelpro-1f0dde0452519496a3d361ad6ddb38731c350a7e.zip |
Improve connection handling and editing:
- Fix long-standing intermittent crashes caused by connection errors after SSH tunnels were established
- Fix edits causing keychain -25299 errors (Issue #1340)
- Allow changes of favourite type to be saved rather than disassociating the edit from the selection
- Fix the favourites view scrolling to the top when there's no selection and connection details are being edited
- Fix some issues with automatic naming of connections on connection type change
Diffstat (limited to 'Source/SPConnectionHandler.m')
-rw-r--r-- | Source/SPConnectionHandler.m | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/SPConnectionHandler.m b/Source/SPConnectionHandler.m index aec8a61e..ec478b74 100644 --- a/Source/SPConnectionHandler.m +++ b/Source/SPConnectionHandler.m @@ -29,6 +29,7 @@ #import "SPSSHTunnel.h" #import "SPKeychain.h" #import "RegexKitLite.h" +#import "SPCategoryAdditions.h" #import <SPMySQL/SPMySQL.h> @@ -176,7 +177,7 @@ static NSString *SPLocalhostAddress = @"127.0.0.1"; // Tidy up isConnecting = NO; - if (sshTunnel) [sshTunnel release], sshTunnel = nil; + if (sshTunnel) [sshTunnel disconnect], [sshTunnel release], sshTunnel = nil; [mySQLConnection release], mySQLConnection = nil; if (!cancellingConnection) [self _restoreConnectionInterface]; @@ -409,7 +410,7 @@ static NSString *SPLocalhostAddress = @"127.0.0.1"; // Inform the delegate that the connection attempt failed if (delegate && [delegate respondsToSelector:@selector(connectionControllerConnectAttemptFailed:)]) { - [delegate connectionControllerConnectAttemptFailed:self]; + [[(NSObject *)delegate onMainThread] connectionControllerConnectAttemptFailed:self]; } // Only display the connection error message if there is a window visible and the connection attempt @@ -423,7 +424,7 @@ static NSString *SPLocalhostAddress = @"127.0.0.1"; * Alert sheet callback method - invoked when an error sheet is closed. */ - (void)connectionFailureSheetDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo -{ +{ // Restore the passwords from keychain for editing if appropriate if (connectionKeychainItemName) { [self setPassword:[keychain getPasswordForName:connectionKeychainItemName account:connectionKeychainItemAccount]]; |