diff --git a/server_instance/zabbix_server/compile_to_radvd_adv_count.cpp b/server_instance/zabbix_server/compile_to_radvd_adv_count.cpp index 142bfe1f87b3751d1f7d1d7b47faae353713af88..494fca2b130998800ad930cf954392046a0a6487 100644 --- a/server_instance/zabbix_server/compile_to_radvd_adv_count.cpp +++ b/server_instance/zabbix_server/compile_to_radvd_adv_count.cpp @@ -60,6 +60,10 @@ int openConnection() { } void updateRouter(const std::string &routerString) { + if (routerLastSeenMap.find(routerString) != routerLastSeenMap.end()) { + routerLastSeenMap.erase(routerString); + } + routerLastSeenMap.insert(std::make_pair(routerString, time(NULL))); }