Fix crash during shutdown of cgroups internal plugin. (#10614)

This commit is contained in:
Markos Fountoulakis 2021-02-08 17:38:40 +02:00 committed by GitHub
parent d206b1684f
commit 9ba79d3a1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -3937,9 +3937,10 @@ static void cgroup_main_cleanup(void *ptr) {
if (!discovery_thread.exited) {
info("stopping discovery thread worker");
uv_mutex_unlock(&discovery_thread.mutex);
uv_mutex_lock(&discovery_thread.mutex);
discovery_thread.start_discovery = 1;
uv_cond_signal(&discovery_thread.cond_var);
uv_mutex_unlock(&discovery_thread.mutex);
}
while (!discovery_thread.exited && max > 0) {