aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPSSHTunnel.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-01-27 01:04:03 +0000
committerrowanbeentje <rowan@beent.je>2010-01-27 01:04:03 +0000
commitb36564545f2290e7e41a794c33783e6ce322bbcc (patch)
tree34dae44e3fd56b88154e8411e0b43407b0c7fb76 /Source/SPSSHTunnel.m
parent9987c0cb9440fea045d56ece1dd8cdd0828c9820 (diff)
downloadsequelpro-b36564545f2290e7e41a794c33783e6ce322bbcc.tar.gz
sequelpro-b36564545f2290e7e41a794c33783e6ce322bbcc.tar.bz2
sequelpro-b36564545f2290e7e41a794c33783e6ce322bbcc.zip
- Fix SSH threads (and connections) which were never cleaned up or closed, probably as a result of r1709
- Improve SSH and object cleanup, especially for cases where the connection drops, to ensure the connection proxy is cleaned up and all memory released
Diffstat (limited to 'Source/SPSSHTunnel.m')
-rw-r--r--Source/SPSSHTunnel.m3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/SPSSHTunnel.m b/Source/SPSSHTunnel.m
index f74804ca..4779e6a1 100644
--- a/Source/SPSSHTunnel.m
+++ b/Source/SPSSHTunnel.m
@@ -59,7 +59,7 @@
// Set up a connection for use by the tunnel process
tunnelConnectionName = [[NSString alloc] initWithFormat:@"SequelPro-%lu", (unsigned long)[[NSString stringWithFormat:@"%f", [[NSDate date] timeIntervalSince1970]] hash]];
tunnelConnectionVerifyHash = [[NSString alloc] initWithFormat:@"%lu", (unsigned long)[[NSString stringWithFormat:@"%f-seeded", [[NSDate date] timeIntervalSince1970]] hash]];
- tunnelConnection = [[NSConnection defaultConnection] retain];
+ tunnelConnection = [NSConnection new];
[tunnelConnection runInNewThread];
[tunnelConnection removeRunLoop:[NSRunLoop currentRunLoop]];
[tunnelConnection setRootObject:self];
@@ -593,6 +593,7 @@
[remoteHost release];
[tunnelConnectionName release];
[tunnelConnectionVerifyHash release];
+ [tunnelConnection invalidate];
[tunnelConnection release];
[debugMessages release];
if (password) [password release];