aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/SPMySQLFramework/Source
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-10-17 21:26:30 +0200
committerMax <post@wickenrode.com>2015-10-17 21:26:30 +0200
commit4d97cbd4df1ebb451d89d6c4e12dd7c622d00b84 (patch)
treecc38ea3b8ff60cb1dbc9d3bd5b75a21163e29c87 /Frameworks/SPMySQLFramework/Source
parent73e5d92a927a1411389e22229872a8a2ff4e6a02 (diff)
downloadsequelpro-4d97cbd4df1ebb451d89d6c4e12dd7c622d00b84.tar.gz
sequelpro-4d97cbd4df1ebb451d89d6c4e12dd7c622d00b84.tar.bz2
sequelpro-4d97cbd4df1ebb451d89d6c4e12dd7c622d00b84.zip
This change will either reduce the amount of crashes or increase the amount of beachballing. In the latter case please file an issue.
Diffstat (limited to 'Frameworks/SPMySQLFramework/Source')
-rw-r--r--Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Ping & KeepAlive.m3
1 files changed, 3 insertions, 0 deletions
diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Ping & KeepAlive.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Ping & KeepAlive.m
index 0c455242..c4469f5c 100644
--- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Ping & KeepAlive.m
+++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Ping & KeepAlive.m
@@ -186,6 +186,9 @@ end:
keepAliveLastPingBlocked = YES;
}
} while (keepAlivePingThreadActive);
+
+ //wait for thread to go away, otherwise our free() below might run before _pingThreadCleanup()
+ pthread_join(keepAlivePingThread_t, NULL);
// Clean up
keepAlivePingThread_t = NULL;