mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-5654 Server crashes on second installation of daemon_example plugin
daemon plugin: join the thread to make sure it exits before the plugin is unloaded
This commit is contained in:
@@ -162,6 +162,7 @@ static int daemon_example_plugin_deinit(void *p __attribute__ ((unused)))
|
|||||||
struct tm tm_tmp;
|
struct tm tm_tmp;
|
||||||
|
|
||||||
pthread_cancel(con->heartbeat_thread);
|
pthread_cancel(con->heartbeat_thread);
|
||||||
|
pthread_join(con->heartbeat_thread, NULL);
|
||||||
|
|
||||||
localtime_r(&result, &tm_tmp);
|
localtime_r(&result, &tm_tmp);
|
||||||
my_snprintf(buffer, sizeof(buffer),
|
my_snprintf(buffer, sizeof(buffer),
|
||||||
|
Reference in New Issue
Block a user