aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/SPMySQLFramework/Source
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2017-11-02 21:21:22 +0100
committerMax <post@wickenrode.com>2017-11-02 21:21:22 +0100
commit273bd3720a857e4b886aa81b561854c250ea20e7 (patch)
tree8fe5a911fb805a0bb1f687032450388d1998ec6e /Frameworks/SPMySQLFramework/Source
parent3477d22387355f9e073af2e2f0b67e65a58b217d (diff)
downloadsequelpro-273bd3720a857e4b886aa81b561854c250ea20e7.tar.gz
sequelpro-273bd3720a857e4b886aa81b561854c250ea20e7.tar.bz2
sequelpro-273bd3720a857e4b886aa81b561854c250ea20e7.zip
Swap two lines of code so that if a connection attempt is cancelled, SP does not try to open another connection to cancel the pending connection (#2909)
Diffstat (limited to 'Frameworks/SPMySQLFramework/Source')
-rw-r--r--Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m
index f581c03c..d50375e2 100644
--- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m
+++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m
@@ -1007,11 +1007,11 @@ static uint64_t _elapsedMicroSecondsSinceAbsoluteTime(uint64_t comparisonTime)
return;
}
- state = SPMySQLDisconnecting;
-
// If a query is active, cancel it
[self cancelCurrentQuery];
+ state = SPMySQLDisconnecting;
+
// Allow any pings or cancelled queries to complete, inside a time limit of ten seconds
uint64_t disconnectStartTime_t = mach_absolute_time();
while (![self _tryLockConnection]) {