Skip to content

Commit

Permalink
bugfix: coredump in ubuntu when it shutdown (#1151)
Browse files Browse the repository at this point in the history
issue:  #1152
  • Loading branch information
kernelai committed Mar 21, 2022
1 parent 5ea6a77 commit 6a4baa6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions include/pika_proxy_cli.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class ProxyCli : public std::enable_shared_from_this<ProxyCli> {
std::shared_ptr<std::string> resp_ptr;
};
void LostConn(const std::string& ip_port);
~ProxyCli();

private:
int cron_interval_;
Expand Down
6 changes: 4 additions & 2 deletions src/pika_proxy_cli.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ int ProxyCli::Start() {

int ProxyCli::Stop() {
client_ptr_->StopThread();
delete proxy_factory_;
delete proxy_handle_;
return pink::kSuccess;
}

Expand Down Expand Up @@ -154,3 +152,7 @@ void ProxyCli::LostConn(const std::string& ip_port) {
delete proxy_task;
}
}
ProxyCli::~ProxyCli() {
delete proxy_factory_;
delete proxy_handle_;
}

0 comments on commit 6a4baa6

Please sign in to comment.