diff options
author | Max <post@wickenrode.com> | 2017-11-02 21:21:22 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2017-11-02 21:21:22 +0100 |
commit | 273bd3720a857e4b886aa81b561854c250ea20e7 (patch) | |
tree | 8fe5a911fb805a0bb1f687032450388d1998ec6e /Frameworks/SPMySQLFramework | |
parent | 3477d22387355f9e073af2e2f0b67e65a58b217d (diff) | |
download | sequelpro-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')
-rw-r--r-- | Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m | 4 |
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]) { |