aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-03-27 22:49:10 +0000
committerrowanbeentje <rowan@beent.je>2010-03-27 22:49:10 +0000
commita7800682c2a2fcd9bb5c85d2f5f965486b3a72d5 (patch)
tree1092fb906c05d4bd5419c380e7457479bcdc64aa /Source
parentca5d50731fc632b99588e4fcab523b559ef95a42 (diff)
downloadsequelpro-a7800682c2a2fcd9bb5c85d2f5f965486b3a72d5.tar.gz
sequelpro-a7800682c2a2fcd9bb5c85d2f5f965486b3a72d5.tar.bz2
sequelpro-a7800682c2a2fcd9bb5c85d2f5f965486b3a72d5.zip
- Improve MCPConnection behaviour with respect to run loops and proxies, improving both proxy disconnection and reconnection after dropped connections
- Slightly tweak SPSSHTunnel to improve proxy behaviour
Diffstat (limited to 'Source')
-rw-r--r--Source/SPSSHTunnel.m6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/SPSSHTunnel.m b/Source/SPSSHTunnel.m
index e6d9729a..46ceea97 100644
--- a/Source/SPSSHTunnel.m
+++ b/Source/SPSSHTunnel.m
@@ -163,7 +163,7 @@
- (void) connect
{
localPort = 0;
-
+
if (connectionState != PROXY_STATE_IDLE) return;
[debugMessages removeAllObjects];
[NSThread detachNewThreadSelector:@selector(launchTask:) toTarget: self withObject: nil ];
@@ -350,12 +350,10 @@
- (void)disconnect
{
if (connectionState == PROXY_STATE_IDLE) return;
-
+
// Before terminating the tunnel, check that it's actually running. This is to accommodate tunnels which
// suddenly disappear as a result of network disconnections.
if ([task isRunning]) [task terminate];
-
- connectionState = PROXY_STATE_IDLE;
if (delegate) [delegate performSelectorOnMainThread:stateChangeSelector withObject:self waitUntilDone:NO];
}