Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix baidu master service leak #2717

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/brpc/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
7 changes: 7 additions & 0 deletions src/brpc/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading