From df0a811b60296fc3d24091b46cb202e509278ff2 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 17 Oct 2015 21:26:30 +0200 Subject: This change will either reduce the amount of crashes or increase the amount of beachballing. In the latter case please file an issue. --- .../Source/SPMySQLConnection Categories/Ping & KeepAlive.m | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Frameworks/SPMySQLFramework/Source') diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Ping & KeepAlive.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Ping & KeepAlive.m index 354b2aee..8b45e551 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Ping & KeepAlive.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Ping & KeepAlive.m @@ -186,6 +186,9 @@ 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; -- cgit v1.2.3