diff --git a/src/server/main_service.cc b/src/server/main_service.cc index c911867d3..57263c957 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.