aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/SPMySQLFramework/Source
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-03-28 01:17:50 +0000
committerrowanbeentje <rowan@beent.je>2012-03-28 01:17:50 +0000
commiteecefddd46c00e61d056f212bb847a598c080cfb (patch)
tree932b76ded7ff659c93fb760a7fda6c9397d2b964 /Frameworks/SPMySQLFramework/Source
parent2a8d178cc928f53430cbefe0fc00a65070ac1c6c (diff)
downloadsequelpro-eecefddd46c00e61d056f212bb847a598c080cfb.tar.gz
sequelpro-eecefddd46c00e61d056f212bb847a598c080cfb.tar.bz2
sequelpro-eecefddd46c00e61d056f212bb847a598c080cfb.zip
- Correctly nest reconnection attempts to preserve previous connection settings in SPMySQL when connections time out, addressing Issue #1309
Diffstat (limited to 'Frameworks/SPMySQLFramework/Source')
-rw-r--r--Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m9
1 files changed, 7 insertions, 2 deletions
diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m
index 6308a3f5..17acaf1b 100644
--- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m
+++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m
@@ -435,10 +435,15 @@ const char *SPMySQLSSLPermissibleCiphers = "DHE-RSA-AES256-SHA:AES256-SHA:DHE-RS
isReconnecting = NO;
[reconnectionPool release];
return NO;
+
+ // By default attempt a reconnect, returning if it fails. If it succeeds, continue
+ // on to the end of the function to restore details if appropriate.
default:
isReconnecting = NO;
- [reconnectionPool release];
- return [self reconnect];
+ if (![self reconnect]) {
+ [reconnectionPool release];
+ return NO;
+ }
}
}