]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#4206] fixed data race
authorRazvan Becheriu <razvan@isc.org>
Sat, 1 Nov 2025 12:26:11 +0000 (14:26 +0200)
committerRazvan Becheriu <razvan@isc.org>
Fri, 21 Nov 2025 15:37:40 +0000 (15:37 +0000)
src/hooks/dhcp/ping_check/ping_check_mgr.cc
src/hooks/dhcp/ping_check/tests/ping_check_mgr_unittests.cc

index 0a9231292a90942f3e8a4019223d0ebb6863bee2..472e4a8168228fe8e52b7c1aa8f4eaac75c7ed55 100644 (file)
@@ -722,6 +722,10 @@ PingCheckMgr::stop() {
     // Cancel the expiration timer.
     cancelExpirationTimer();
 
+    if (thread_pool_) {
+        thread_pool_->pause();
+    }
+
     if (channel_) {
         channel_->close();
     }
index af70317d7e917c80dc149efed8dcb60e94686c6b..b370e03d8cea94252deb52f965285441583b65e0 100644 (file)
@@ -1482,6 +1482,9 @@ public:
 
         // We should have one free that matches our lease query pair.
         compareLeaseQueryPairs(frees_);
+
+        // Stop the mgr.
+        ASSERT_NO_THROW(mgr_->stop());
     }
 
     /// @brief Exercises shouldPing().