aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-10-17 21:26:30 +0200
committerAbhi Beckert <abhi@abhibeckert.com>2016-02-26 17:06:19 +1000
commitdf0a811b60296fc3d24091b46cb202e509278ff2 (patch)
treebbe5bc23625bbef7d0debbb73fcc0fb1011ec69d /Frameworks
parent9c6e670555a07aece2ec133ca7322326eae516a9 (diff)
downloadsequelpro-df0a811b60296fc3d24091b46cb202e509278ff2.tar.gz
sequelpro-df0a811b60296fc3d24091b46cb202e509278ff2.tar.bz2
sequelpro-df0a811b60296fc3d24091b46cb202e509278ff2.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')
-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 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;