Skip to content

Commit

Permalink
[fix] An initial startup failure in remote mode caused reloading and …
Browse files Browse the repository at this point in the history
…exiting functions not working afterwards
  • Loading branch information
pajama-coder committed Jun 15, 2024
1 parent c9c649e commit ca8154b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
2 changes: 2 additions & 0 deletions src/worker-thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ca8154b

Please sign in to comment.