From ca927a527fe72b0a234d6684ae0e87cb78620f5f Mon Sep 17 00:00:00 2001 From: Jindong Zhang Date: Wed, 11 May 2022 21:05:43 +0800 Subject: [PATCH] fix a deadlock --- src/pipe.c | 1 + src/utils.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pipe.c b/src/pipe.c index 8b30699..bba4444 100644 --- a/src/pipe.c +++ b/src/pipe.c @@ -118,6 +118,7 @@ void uvloop_process_income(uv_async_t *handle) { if (get_state_mode() == MODE_SERVER_PROCESS) { if (!server_see_agent_is_repl) { + queue_unlock_internal(q); return; } send_base64binary_to_agent(f->buf, f->len); diff --git a/src/utils.c b/src/utils.c index 5165c83..5b0f2e3 100644 --- a/src/utils.c +++ b/src/utils.c @@ -4,7 +4,9 @@ * This software is released under the MIT License. * https://opensource.org/licenses/MIT */ - +#define _GNU_SOURCE +#include +#include #include "utils.h" #include "log.h" #include