aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m
diff options
context:
space:
mode:
Diffstat (limited to 'Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m')
-rw-r--r--Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m12
1 files changed, 8 insertions, 4 deletions
diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m
index 6308a3f5..800157ca 100644
--- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m
+++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m
@@ -54,8 +54,6 @@ const char *SPMySQLSSLPermissibleCiphers = "DHE-RSA-AES256-SHA:AES256-SHA:DHE-RS
#pragma mark -
#pragma mark Synthesized properties
-@synthesize delegate;
-@synthesize proxy;
@synthesize host;
@synthesize username;
@synthesize password;
@@ -124,6 +122,7 @@ const char *SPMySQLSSLPermissibleCiphers = "DHE-RSA-AES256-SHA:AES256-SHA:DHE-RS
previousEncodingUsesLatin1Transport = NO;
// Initialise default delegate settings
+ delegate = nil;
delegateSupportsWillQueryString = NO;
delegateSupportsConnectionLost = NO;
delegateQueryLogging = YES;
@@ -435,10 +434,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;
+ }
}
}