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 142bfe1..494fca2 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))); }