aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMMCPConnection.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-04-11 10:55:35 +0000
committerrowanbeentje <rowan@beent.je>2009-04-11 10:55:35 +0000
commit93c8b122f50fe8760e2f9dd5ba4157528d71f3c0 (patch)
treea4c27d8fb2724017b3283259ca390b08c5f0ee77 /Source/CMMCPConnection.m
parent1824ae6360c9ce1897e75404163d39df08ee5fbf (diff)
downloadsequelpro-93c8b122f50fe8760e2f9dd5ba4157528d71f3c0.tar.gz
sequelpro-93c8b122f50fe8760e2f9dd5ba4157528d71f3c0.tar.bz2
sequelpro-93c8b122f50fe8760e2f9dd5ba4157528d71f3c0.zip
- Tweak code to use the new UseKeepAlive preference value
- Update a few pref checks which were using the old pref values still - Resort preference defaults to match layout in prefs, restore old default values for some keys - Restore missing defaults for new editor properties
Diffstat (limited to 'Source/CMMCPConnection.m')
-rw-r--r--Source/CMMCPConnection.m7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/CMMCPConnection.m b/Source/CMMCPConnection.m
index 9f8c78fa..99b72e42 100644
--- a/Source/CMMCPConnection.m
+++ b/Source/CMMCPConnection.m
@@ -67,9 +67,10 @@ static void forcePingTimeout(int signalNumber);
connectionPort = 0;
connectionSocket = nil;
keepAliveTimer = nil;
- connectionTimeout = [[[NSUserDefaults standardUserDefaults] objectForKey:@"connectionTimeout"] intValue];
+ connectionTimeout = [[[NSUserDefaults standardUserDefaults] objectForKey:@"ConnectionTimeout"] intValue];
if (!connectionTimeout) connectionTimeout = 10;
- keepAliveInterval = [[[NSUserDefaults standardUserDefaults] objectForKey:@"keepAliveInterval"] doubleValue];
+ useKeepAlive = [[[NSUserDefaults standardUserDefaults] objectForKey:@"UseKeepAlive"] doubleValue];
+ keepAliveInterval = [[[NSUserDefaults standardUserDefaults] objectForKey:@"KeepAliveInterval"] doubleValue];
if (!keepAliveInterval) keepAliveInterval = 0;
lastKeepAliveSuccess = nil;
lastQueryExecutionTime = 0;
@@ -637,7 +638,7 @@ static void forcePingTimeout(int signalNumber)
lastKeepAliveSuccess = nil;
}
- if (keepAliveInterval) {
+ if (useKeepAlive && keepAliveInterval) {
keepAliveTimer = [NSTimer
scheduledTimerWithTimeInterval:keepAliveInterval
target:self