summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
authorMarkos Fountoulakis <44345837+mfundul@users.noreply.github.com>2020-01-17 17:20:20 +0200
committerGitHub <noreply@github.com>2020-01-17 17:20:20 +0200
commitdacd6b9b11ecf3f843121be743b81967d3533072 (patch)
tree93452d43a214a6d01cd6a13d924591eec7b11986 /daemon
parent413d6a20539c50933553d6bc7f4f0cfbdeb5eed6 (diff)
Fix libuv IPC pipe cleanup problem (#7778)
* Fix libuv IPC pipe cleanup problem
Diffstat (limited to 'daemon')
-rw-r--r--daemon/commands.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/daemon/commands.c b/daemon/commands.c
index cbf71c47f9..8f793b80f8 100644
--- a/daemon/commands.c
+++ b/daemon/commands.c
@@ -526,7 +526,7 @@ static void command_thread(void *arg)
info("Shutting down command event loop.");
uv_close((uv_handle_t *)&async, NULL);
uv_close((uv_handle_t*)&server_pipe, NULL);
- uv_run(loop, UV_RUN_DEFAULT);
+ uv_run(loop, UV_RUN_DEFAULT); /* flush all libuv handles */
info("Shutting down command loop complete.");
assert(0 == uv_loop_close(loop));
@@ -540,6 +540,7 @@ error_after_pipe_bind:
error_after_pipe_init:
uv_close((uv_handle_t *)&async, NULL);
error_after_async_init:
+ uv_run(loop, UV_RUN_DEFAULT); /* flush all libuv handles */
assert(0 == uv_loop_close(loop));
error_after_loop_init:
freez(loop);
@@ -587,7 +588,7 @@ void commands_init(void)
return;
after_error:
- error("Failed to initialize command server.");
+ error("Failed to initialize command server. The netdata cli tool will be unable to send commands.");
}
void commands_exit(void)