Skip to content

Commit

Permalink
bugfix: SetDebugIP will use empty address when call as SetDebugIP(hos…
Browse files Browse the repository at this point in the history
…t, “”)
  • Loading branch information
outman-zhou committed Jan 2, 2020
1 parent b0491f6 commit dd787ca
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions mars/stn/src/net_source.cc
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,12 @@ void NetSource::SetDebugIP(const std::string& _host, const std::string& _ip) {
ScopedLock lock(sg_ip_mutex);

xinfo2(TSF "task set debugip:%_ for host:%_", _ip, _host);

if (_ip.empty() && sg_host_debugip_mapping.find(_host) != sg_host_debugip_mapping.end()) {
sg_host_debugip_mapping.erase(_host);
}
else {
sg_host_debugip_mapping[_host] = _ip;
}

if (_ip.empty()){
sg_host_debugip_mapping.erase(_host);
}else{
sg_host_debugip_mapping[_host] = _ip;
}
}

const std::string& NetSource::GetLongLinkDebugIP() {
Expand Down

0 comments on commit dd787ca

Please sign in to comment.