diff --git a/src/ray/core_worker/core_worker.cc b/src/ray/core_worker/core_worker.cc index da8c1873e..70ab1d427 100644 --- a/src/ray/core_worker/core_worker.cc +++ b/src/ray/core_worker/core_worker.cc @@ -2818,15 +2818,16 @@ void CoreWorker::HandleExit(const rpc::ExitRequest &request, rpc::ExitReply *rep // any object pinning RPCs in flight. bool is_idle = !own_objects && pins_in_flight == 0; reply->set_success(is_idle); - send_reply_callback(Status::OK(), - [this, is_idle]() { - // If the worker is idle, we exit. - if (is_idle) { - Exit(rpc::WorkerExitType::INTENDED_EXIT); - } - }, - // We need to kill it regardless if the RPC failed. - [this]() { Exit(rpc::WorkerExitType::INTENDED_EXIT); }); + send_reply_callback( + Status::OK(), + [this, is_idle]() { + // If the worker is idle, we exit. + if (is_idle) { + Exit(rpc::WorkerExitType::INTENDED_EXIT); + } + }, + // We need to kill it regardless if the RPC failed. + [this]() { Exit(rpc::WorkerExitType::INTENDED_EXIT); }); } void CoreWorker::YieldCurrentFiber(FiberEvent &event) { diff --git a/src/ray/gcs/gcs_server/gcs_server_main.cc b/src/ray/gcs/gcs_server/gcs_server_main.cc index b6cfb6eb9..f11af634d 100644 --- a/src/ray/gcs/gcs_server/gcs_server_main.cc +++ b/src/ray/gcs/gcs_server/gcs_server_main.cc @@ -75,8 +75,7 @@ int main(int argc, char *argv[]) { storage->InternalConfigTable().Put(ray::UniqueID::Nil(), config, on_done)); boost::asio::io_service::work work(service); service.run(); - }) - .detach(); + }).detach(); promise->get_future().get(); const ray::stats::TagsType global_tags = {