This is an automated email from the ASF dual-hosted git repository. wwbmmm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/brpc.git
The following commit(s) were added to refs/heads/master by this push: new 455310a5 Fix baidu master service leak (#2717) 455310a5 is described below commit 455310a5ab948eeb751f1e1e8f9000998dbfced1 Author: Bright Chen <chenguangmin...@foxmail.com> AuthorDate: Mon Jul 29 10:31:26 2024 +0800 Fix baidu master service leak (#2717) --- src/brpc/server.cpp | 3 +++ src/brpc/server.h | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/src/brpc/server.cpp b/src/brpc/server.cpp index 399f348d..00cdec79 100644 --- a/src/brpc/server.cpp +++ b/src/brpc/server.cpp @@ -443,6 +443,9 @@ Server::~Server() { _options.thrift_service = NULL; #endif + delete _options.baidu_master_service; + _options.baidu_master_service = NULL; + delete _options.http_master_service; _options.http_master_service = NULL; diff --git a/src/brpc/server.h b/src/brpc/server.h index c9459c23..fdcba68f 100644 --- a/src/brpc/server.h +++ b/src/brpc/server.h @@ -226,6 +226,13 @@ struct ServerOptions { // Default: false bool use_rdma; + // [CAUTION] This option is for implementing specialized baidu-std proxies, + // most users don't need it. Don't change this option unless you fully + // understand the description below. + // If this option is set, all baidu-std requests to the server will be delegated + // to this service. + // + // Owned by Server and deleted in server's destructor. BaiduMasterService* baidu_master_service; // [CAUTION] This option is for implementing specialized http proxies, --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org