From d1f576789f2ecb743bf1a138fd63d418d9be6877 Mon Sep 17 00:00:00 2001 From: thxCode Date: Thu, 29 Aug 2024 16:25:30 +0800 Subject: [PATCH] fix: rpc server Signed-off-by: thxCode --- llama-box/rpcserver.hpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/llama-box/rpcserver.hpp b/llama-box/rpcserver.hpp index 7e711cb..bfafb38 100644 --- a/llama-box/rpcserver.hpp +++ b/llama-box/rpcserver.hpp @@ -701,7 +701,6 @@ static void rpcserver_serve(ggml_backend_t bkd, int32_t idx, size_t cap, rpc_soc output.clear(); input.clear(); } - close(sockfd); } // RPC server entry point @@ -801,7 +800,6 @@ static int rpcserver_start(const rpcserver_params ¶ms) { int ret = setsockopt(cli_socketfd, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(int)); if (ret != 0) { LOG_ERROR("failed to set client socket TCP_NODELAY", {}); - close(cli_socketfd); continue; } @@ -819,7 +817,6 @@ static int rpcserver_start(const rpcserver_params ¶ms) { } catch (const std::system_error &e) { LOG_ERROR("failed to process client connection", {{"ip", cli_ip}, {"port", cli_port}, {"error", e.what()}}); - close(cli_socketfd); } } #ifdef _WIN32