From aaaae93afce6729b39e1d3b1e80f54af12b570f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nico=20Sch=C3=BCmann?= <freifunkhh@nico22.de>
Date: Wed, 10 Dec 2014 00:40:57 +0100
Subject: [PATCH] Bug fix

---
 server_instance/zabbix_server/compile_to_radvd_adv_count.cpp | 4 ++++
 1 file changed, 4 insertions(+)

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)));
 }
 
-- 
GitLab