From 9723e98316bbdfcdede43d8d8ccbaf82bb283268 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 17 Jun 2024 14:36:48 +0200 Subject: [PATCH] dnsdist: Fix replacement of existing custom web handlers --- pdns/dnsdistdist/dnsdist-web.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/dnsdistdist/dnsdist-web.cc b/pdns/dnsdistdist/dnsdist-web.cc index 4e18a63752..f439fe9b4a 100644 --- a/pdns/dnsdistdist/dnsdist-web.cc +++ b/pdns/dnsdistdist/dnsdist-web.cc @@ -1730,7 +1730,7 @@ void registerWebHandler(const std::string& endpoint, WebHandler handler, bool is void registerWebHandler(const std::string& endpoint, WebHandler handler, bool isLua) { auto handlers = s_webHandlers.write_lock(); - (*handlers).emplace(std::make_pair(endpoint, WebHandlerContext{std::move(handler), isLua})); + (*handlers)[endpoint] = WebHandlerContext{std::move(handler), isLua}; } void clearWebHandlers() -- 2.47.2