Fix crash
This commit is contained in:
parent
b819d6fd65
commit
07a151ebdf
3 changed files with 49 additions and 5 deletions
|
|
@ -1043,6 +1043,22 @@ void Client::Impl::ProcessSavedLinks() {
|
|||
{
|
||||
std::lock_guard<std::mutex> lock(cache_mutex);
|
||||
for (auto it = saved_links.begin(); it != saved_links.end();) {
|
||||
bool covered_by_rule = false;
|
||||
for (const auto& node_entry : nodes) {
|
||||
if (node_entry.second.name != it->out_node) continue;
|
||||
for (const auto& rule_entry : route_rules) {
|
||||
if (MatchesRule(node_entry.second, rule_entry.second.match) &&
|
||||
rule_entry.second.target_node == it->in_node) {
|
||||
covered_by_rule = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (covered_by_rule) break;
|
||||
}
|
||||
if (covered_by_rule) {
|
||||
it = saved_links.erase(it);
|
||||
continue;
|
||||
}
|
||||
uint32_t out_id = 0, in_id = 0;
|
||||
for (const auto& port_entry : ports) {
|
||||
const PortInfo& port = port_entry.second;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue