diff --git a/trpc/server/trpc_server.cc b/trpc/server/trpc_server.cc index 35f9c2df..43f57a39 100644 --- a/trpc/server/trpc_server.cc +++ b/trpc/server/trpc_server.cc @@ -107,10 +107,10 @@ void TrpcServer::BuildAdminServiceAdapter() { option.max_conn_num = 100; option.max_packet_size = UINT32_MAX; option.threadmodel_instance_name = std::string(kSeparateAdminInstance); + admin_service_name_ = option.service_name; auto service_adapter = std::make_shared(std::move(option)); - admin_service_name_ = option.service_name; admin_service_ = std::make_shared(); admin_service_->SetAdapter(service_adapter.get());