From c02ee7c8c82e8b0f469c42b8b8b5e9704d12ea49 Mon Sep 17 00:00:00 2001 From: Vladislav Oleshko Date: Fri, 13 Jan 2023 21:15:30 +0300 Subject: [PATCH] fix(server): Fix shutdown order Signed-off-by: Vladislav Oleshko --- src/server/main_service.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/main_service.cc b/src/server/main_service.cc index c911867d387c..57263c9575f0 100644 --- a/src/server/main_service.cc +++ b/src/server/main_service.cc @@ -498,14 +498,14 @@ void Service::Shutdown() { // rejected pp_.AwaitFiberOnAll([](ProactorBase* pb) { ServerState::tlocal()->Shutdown(); }); - engine_varz.reset(); - request_latency_usec.Shutdown(); - // to shutdown all the runtime components that depend on EngineShard. server_family_.Shutdown(); StringFamily::Shutdown(); GenericFamily::Shutdown(); + engine_varz.reset(); + request_latency_usec.Shutdown(); + shard_set->Shutdown(); // wait for all the pending callbacks to stop.