aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPConnectionHandler.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-01-28 17:48:40 +0000
committerstuconnolly <stuart02@gmail.com>2012-01-28 17:48:40 +0000
commitdcff7d1299bd0887736f7464698b61ef18a94416 (patch)
tree703475e6bc6d2d117c2eee3b7486e0a5cf61e63c /Source/SPConnectionHandler.m
parent816c870b93ad7bd3078d8b7a700e24354adfe4af (diff)
downloadsequelpro-dcff7d1299bd0887736f7464698b61ef18a94416.tar.gz
sequelpro-dcff7d1299bd0887736f7464698b61ef18a94416.tar.bz2
sequelpro-dcff7d1299bd0887736f7464698b61ef18a94416.zip
Tidy up.
Diffstat (limited to 'Source/SPConnectionHandler.m')
-rw-r--r--Source/SPConnectionHandler.m8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/SPConnectionHandler.m b/Source/SPConnectionHandler.m
index ccdad4d1..4ce34c44 100644
--- a/Source/SPConnectionHandler.m
+++ b/Source/SPConnectionHandler.m
@@ -30,6 +30,8 @@
#import "SPKeychain.h"
#import "RegexKitLite.h"
+static NSString *SPLocalhostAddress = @"127.0.0.1";
+
@interface SPConnectionController ()
- (void)_restoreConnectionInterface;
@@ -69,7 +71,7 @@
}
else {
if ([self type] == SPSSHTunnelConnection) {
- mySQLConnection = [[MCPConnection alloc] initToHost:@"127.0.0.1"
+ mySQLConnection = [[MCPConnection alloc] initToHost:SPLocalhostAddress
withLogin:[self user]
usingPort:[sshTunnel localPort]];
[mySQLConnection setConnectionProxy:sshTunnel];
@@ -427,12 +429,12 @@
// Change connection details
[self setPort:tunnelPort];
- [self setHost:@"127.0.0.1"];
+ [self setHost:SPLocalhostAddress];
// Change to standard TCP/IP connection view
[self resizeTabViewToConnectionType:SPTCPIPConnection animating:YES];
- // Initiate the connection after half a second to give the connection view a chance to resize
+ // Initiate the connection after a half second delay to give the connection view a chance to resize
[self performSelector:@selector(initiateConnection:) withObject:self afterDelay:0.5];
}
}