Permalink
Browse files

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)
  • Loading branch information...
dmoagx committed Nov 2, 2017
1 parent 3477d22 commit 273bd3720a857e4b886aa81b561854c250ea20e7
Showing with 2 additions and 2 deletions.
  1. +2 −2 Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m
@@ -1007,11 +1007,11 @@ - (void)_disconnect
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]) {

0 comments on commit 273bd37

Please sign in to comment.