We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 833d872 + cbfadab commit c866a5bCopy full SHA for c866a5b
Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Ping & KeepAlive.m
@@ -81,8 +81,10 @@ - (void)_keepAlive
81
*/
82
- (void)_threadedKeepAlive
83
{
84
- if(keepAliveThread) {
85
- NSLog(@"warning: overwriting existing keepAliveThread: %@, results may be unpredictable!",keepAliveThread);
+ @synchronized(self) {
+ if(keepAliveThread) {
86
+ NSLog(@"warning: overwriting existing keepAliveThread: %@, results may be unpredictable!",keepAliveThread);
87
+ }
88
}
89
90
keepAliveThread = [NSThread currentThread];
@@ -114,7 +116,9 @@ - (void)_threadedKeepAlive
114
116
keepAlivePingFailures++;
115
117
118
end_cleanup:
- keepAliveThread = nil;
119
120
+ keepAliveThread = nil;
121
122
123
124
#pragma mark -
0 commit comments