aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2016-02-18 02:49:28 +0100
committerMax <post@wickenrode.com>2016-02-18 02:49:28 +0100
commitf2575a3a755e625330263c06403d167f7e7901d4 (patch)
tree80771ed692531184b2b9b13579b4f7e3506cd593 /Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m
parenta19f4b3754e331787aed418866ed31e97ff2151a (diff)
downloadsequelpro-f2575a3a755e625330263c06403d167f7e7901d4.tar.gz
sequelpro-f2575a3a755e625330263c06403d167f7e7901d4.tar.bz2
sequelpro-f2575a3a755e625330263c06403d167f7e7901d4.zip
* Change a while() to do while; to help code analysis
* Add log message (possibly related to #2258)
Diffstat (limited to 'Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m')
-rw-r--r--Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m
index e102c24d..286296af 100644
--- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m
+++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m
@@ -928,7 +928,10 @@ static uint64_t _elapsedMicroSecondsSinceAbsoluteTime(uint64_t comparisonTime)
uint64_t disconnectStartTime_t = mach_absolute_time();
while (![self _tryLockConnection]) {
usleep(100000);
- if (_elapsedSecondsSinceAbsoluteTime(disconnectStartTime_t) > 10) break;
+ if (_elapsedSecondsSinceAbsoluteTime(disconnectStartTime_t) > 10) {
+ NSLog(@"%s: Could not acquire connection lock within time limit (10s). Forcing unlock!",__PRETTY_FUNCTION__);
+ break;
+ }
}
[self _unlockConnection];
[self _cancelKeepAlives];