Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
fixstmgrcrash (#3492)
Browse files Browse the repository at this point in the history
Co-authored-by: Huijun Wu <[email protected]>
  • Loading branch information
huijunwu and huijunw authored Mar 25, 2020
1 parent 9ddbeb6 commit f76f479
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions heron/stmgr/src/cpp/manager/stmgr-clientmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ bool StMgrClientMgr::DidAnnounceBackPressure() {
return stream_manager_->DidAnnounceBackPressure();
}

shared_ptr<StMgrClient> StMgrClientMgr::CreateClient(const sp_string& _other_stmgr_id,
StMgrClient* StMgrClientMgr::CreateClient(const sp_string& _other_stmgr_id,
const sp_string& _hostname, sp_int32 _port) {
stmgr_clientmgr_metrics_->scope(METRIC_STMGR_NEW_CONNECTIONS)->incr();
NetworkOptions options;
Expand All @@ -126,7 +126,7 @@ shared_ptr<StMgrClient> StMgrClientMgr::CreateClient(const sp_string& _other_stm
options.set_high_watermark(high_watermark_);
options.set_low_watermark(low_watermark_);
options.set_socket_family(PF_INET);
auto client = make_shared<StMgrClient>(eventLoop_, options, topology_name_, topology_id_,
StMgrClient* client = new StMgrClient(eventLoop_, options, topology_name_, topology_id_,
stmgr_id_, _other_stmgr_id, this, metrics_manager_client_,
droptuples_upon_backpressure_);
client->Start();
Expand Down
4 changes: 2 additions & 2 deletions heron/stmgr/src/cpp/manager/stmgr-clientmgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ class StMgrClientMgr {
virtual bool AllStMgrClientsRegistered();

private:
shared_ptr<StMgrClient> CreateClient(const sp_string& _other_stmgr_id,
StMgrClient* CreateClient(const sp_string& _other_stmgr_id,
const sp_string& _host_name, sp_int32 _port);

// map of stmgrid to its client
std::unordered_map<sp_string, shared_ptr<StMgrClient>> clients_;
std::unordered_map<sp_string, StMgrClient*> clients_;

sp_string topology_name_;
sp_string topology_id_;
Expand Down

0 comments on commit f76f479

Please sign in to comment.