diff --git a/src/main.cpp b/src/main.cpp index 9e159303..20962b31 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -633,9 +633,11 @@ int pipy_main(int argc, char *argv[]) { }; exit = [&]() { - s_pool_cleaner.stop(); - s_code_updater.stop(); - s_signal_handler.stop(); + if (!is_remote) { + s_pool_cleaner.stop(); + s_code_updater.stop(); + s_signal_handler.stop(); + } exit_code = 0; }; diff --git a/src/worker-thread.cpp b/src/worker-thread.cpp index 71092410..7be27d4f 100644 --- a/src/worker-thread.cpp +++ b/src/worker-thread.cpp @@ -568,6 +568,8 @@ bool WorkerManager::start(int concurrency, bool force) { m_concurrency = concurrency; m_loading_pipeline_lb = PipelineLoadBalancer::make(); + m_stopping = false; + m_stopped = false; for (int i = 0; i < concurrency; i++) { auto wt = new WorkerThread(this, i);