aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/MCPKit/MCPFoundationKit
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-08-08 00:16:37 +0000
committerrowanbeentje <rowan@beent.je>2011-08-08 00:16:37 +0000
commit478e10757b2a53c7dc52dd3a7b21dd4d7b5e84a9 (patch)
treee3b9f07a50ec11f57c5bd80883b75ab423f9e5bc /Frameworks/MCPKit/MCPFoundationKit
parent2b94680bc07b670402f065e37ddca883d260dc9f (diff)
downloadsequelpro-478e10757b2a53c7dc52dd3a7b21dd4d7b5e84a9.tar.gz
sequelpro-478e10757b2a53c7dc52dd3a7b21dd4d7b5e84a9.tar.bz2
sequelpro-478e10757b2a53c7dc52dd3a7b21dd4d7b5e84a9.zip
- Improve interactive_timeout handling, ensuring a minimum timeout of five minutes to improve keepalive behaviour. This improves on r3369 and should complete Issue #877.
- Fix memory leak added in r3382
Diffstat (limited to 'Frameworks/MCPKit/MCPFoundationKit')
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m9
1 files changed, 9 insertions, 0 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
index 47d45c8f..0e96ce5d 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
@@ -3338,6 +3338,15 @@ void pingThreadCleanup(void *pingDetails)
encoding = [[NSString alloc] initWithString:serverEncoding];
stringEncoding = [MCPConnection encodingForMySQLEncoding:[self cStringFromString:encoding]];
encodingUsesLatin1Transport = NO;
+
+ // Check the interactive timeout - if it's below five minutes, increase it to ten to imprive timeout/keepalive behaviour
+ if ([variables objectForKey:@"interactive_timeout"]) {
+ if ([[variables objectForKey:@"interactive_timeout"] integerValue] < 300) {
+ [self queryString:@"SET interactive_timeout=600"];
+ }
+ }
+
+ [variables release];
}
/**