From 077d496ac766f473f10d85a449dde315410115b4 Mon Sep 17 00:00:00 2001 From: chhy2009 Date: Wed, 26 Jun 2024 16:16:01 +0800 Subject: [PATCH] BugFix: Fix the issue of deregistering AdminService when the service exits in self-register case. --- trpc/server/trpc_server.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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());