mirror of
https://github.com/qicosmos/rest_rpc.git
synced 2026-08-29 16:40:48 +08:00
clean token list
This commit is contained in:
@@ -149,6 +149,21 @@ private:
|
||||
for (auto it = sub_map_.cbegin(); it != sub_map_.cend();) {
|
||||
auto conn = it->second.lock();
|
||||
if (conn == nullptr || conn->has_closed()) {
|
||||
//remove token
|
||||
for (auto t = token_list_.begin(); t != token_list_.end(); ) {
|
||||
if (it->first.find(*t) != std::string::npos) {
|
||||
t = token_list_.erase(t);
|
||||
}
|
||||
else {
|
||||
++t;
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& item : token_list_) {
|
||||
if (it->first.find(item) != std::string::npos) {
|
||||
|
||||
}
|
||||
}
|
||||
it = sub_map_.erase(it);
|
||||
} else {
|
||||
++it;
|
||||
|
||||
Reference in New Issue
Block a user