Skip to content

Commit

Permalink
feat: clear all ips under the host when remove ip is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
I-m-SuperMan committed Apr 9, 2020
1 parent 036f137 commit 67c1aba
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion framework/utils/globalSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ namespace Cicada {
std::unique_lock<std::mutex> uMutex(mMutex);
auto item = mResolve.find(host);
if (item != mResolve.end()) {
(*item).second.erase(ip);

if(ip.empty()) {
(*item).second.clear();
} else {
(*item).second.erase(ip);
}

if ((*item).second.empty()) {
mResolve.erase(item);
Expand Down

0 comments on commit 67c1aba

Please sign in to comment.