diff options
author | Vladimir Kobal <vlad@prokk.net> | 2020-08-17 10:31:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-17 10:31:25 +0300 |
commit | 43c4d1edaaefd38c5597d6a83a17cdc219ff395e (patch) | |
tree | 626312f89e7760a5a5755a9b92bdcb4048406b25 /exporting/send_data.c | |
parent | 3136ef137362e4f4bae50758964e3cbf22ff3e84 (diff) |
Add check for spurious wakeups (#9751)
Diffstat (limited to 'exporting/send_data.c')
-rw-r--r-- | exporting/send_data.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/exporting/send_data.c b/exporting/send_data.c index e7fda72331..cc107ea2dd 100644 --- a/exporting/send_data.c +++ b/exporting/send_data.c @@ -340,7 +340,9 @@ void simple_connector_worker(void *instance_p) // if we are connected, send our buffer to the data collecting server uv_mutex_lock(&instance->mutex); - uv_cond_wait(&instance->cond_var, &instance->mutex); + while (!instance->data_is_ready) + uv_cond_wait(&instance->cond_var, &instance->mutex); + instance->data_is_ready = 0; if (unlikely(instance->engine->exit)) { uv_mutex_unlock(&instance->mutex); |