Parcourir la source

[3975] Unregister timers prior to reconfiguration.

Marcin Siodelski il y a 9 ans
Parent
commit
0be32c7229
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      src/bin/dhcp6/json_config_parser.cc

+ 4 - 0
src/bin/dhcp6/json_config_parser.cc

@@ -26,6 +26,7 @@
 #include <dhcpsrv/cfgmgr.h>
 #include <dhcpsrv/cfgmgr.h>
 #include <dhcpsrv/pool.h>
 #include <dhcpsrv/pool.h>
 #include <dhcpsrv/subnet.h>
 #include <dhcpsrv/subnet.h>
+#include <dhcpsrv/timer_mgr.h>
 #include <dhcpsrv/triplet.h>
 #include <dhcpsrv/triplet.h>
 #include <dhcpsrv/parsers/dbaccess_parser.h>
 #include <dhcpsrv/parsers/dbaccess_parser.h>
 #include <dhcpsrv/parsers/dhcp_config_parser.h>
 #include <dhcpsrv/parsers/dhcp_config_parser.h>
@@ -745,6 +746,9 @@ configureDhcp6Server(Dhcpv6Srv&, isc::data::ConstElementPtr config_set) {
     // so newly recreated configuration starts with first subnet-id equal 1.
     // so newly recreated configuration starts with first subnet-id equal 1.
     Subnet::resetSubnetID();
     Subnet::resetSubnetID();
 
 
+    // Remove any existing timers.
+    TimerMgr::instance()->unregisterTimers();
+
     // Some of the values specified in the configuration depend on
     // Some of the values specified in the configuration depend on
     // other values. Typically, the values in the subnet6 structure
     // other values. Typically, the values in the subnet6 structure
     // depend on the global values. Also, option values configuration
     // depend on the global values. Also, option values configuration