From 0fca4a6e416a3489be3a3366fe365af1f290c4fa Mon Sep 17 00:00:00 2001 From: amass <168062547@qq.com> Date: Sun, 10 Nov 2024 20:29:54 +0800 Subject: [PATCH] make command not block. --- .gitea/workflows/deploy.yaml | 14 +++++++------- Server/Application.cpp | 1 - 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 90621a8..3b65388 100755 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -48,13 +48,13 @@ jobs: username: ${{ vars.YUYUN_USER }} password: ${{ secrets.SERVER_ROOT_PASSWORD }} script: | - cd /root/Server - source /etc/profile - /root/Server/HttpServer --exit - sleep 10 - cp /tmp/HttpServer /root/Server/HttpServer - /root/Server/HttpServer & - exit 0 + cd /root/Server; + source /etc/profile; + /root/Server/HttpServer --exit; + sleep 10; + cp /tmp/HttpServer /root/Server/HttpServer; + /root/Server/HttpServer &; + exit 0; - name: Notify-End if: ${{ always() }} run: | diff --git a/Server/Application.cpp b/Server/Application.cpp index fb5e0eb..f8ab7f6 100644 --- a/Server/Application.cpp +++ b/Server/Application.cpp @@ -346,7 +346,6 @@ void Application::startAcceptRequest() { } void Application::requetExit() { - nng_log_set_logger(nng_stderr_logger); LOG(info) << "send exit request to program."; Nng::Socket request(Nng::Request); request.setOption(Nng::RecvTimeout, std::chrono::milliseconds(2000));