diff options
author | Abhi Beckert <abhi@abhibeckert.com> | 2017-03-10 13:12:14 +1000 |
---|---|---|
committer | Abhi Beckert <abhi@abhibeckert.com> | 2017-03-10 13:12:14 +1000 |
commit | c866a5bbfc741eed3883d6f7eccbaeae7c744970 (patch) | |
tree | 11f172f15cf94737584279088157e87a546f57e3 | |
parent | 833d8726302d854684dfa52db92e30c6766a8b63 (diff) | |
parent | cbfadab19e17a4c50e4ddfd5599887cb0597ced5 (diff) | |
download | sequelpro-c866a5bbfc741eed3883d6f7eccbaeae7c744970.tar.gz sequelpro-c866a5bbfc741eed3883d6f7eccbaeae7c744970.tar.bz2 sequelpro-c866a5bbfc741eed3883d6f7eccbaeae7c744970.zip |
Merge remote-tracking branch 'sequelpro/master'
-rw-r--r-- | Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Ping & KeepAlive.m | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Ping & KeepAlive.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Ping & KeepAlive.m index 374d0909..d46b5552 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Ping & KeepAlive.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Ping & KeepAlive.m @@ -81,8 +81,10 @@ */ - (void)_threadedKeepAlive { - if(keepAliveThread) { - NSLog(@"warning: overwriting existing keepAliveThread: %@, results may be unpredictable!",keepAliveThread); + @synchronized(self) { + if(keepAliveThread) { + NSLog(@"warning: overwriting existing keepAliveThread: %@, results may be unpredictable!",keepAliveThread); + } } keepAliveThread = [NSThread currentThread]; @@ -114,7 +116,9 @@ keepAlivePingFailures++; } end_cleanup: - keepAliveThread = nil; + @synchronized(self) { + keepAliveThread = nil; + } } #pragma mark - |