From e0f508176fddd421fbbd52d4e4057d182653dbd6 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 28 Oct 2024 14:45:07 +0100 Subject: [PATCH] rec: release ref to key in MTasker::waitEvent If we do not do that, only the next call of sendEvent will release the shared pointer to the TCPConnectionHanlder in PacketID. This might delay cleaning TCP objects up on not-so-busy threads. Fixes #13422, thought it can still take a while on idle recursors, as the housekeeping function is not called often in those cases. --- pdns/recursordist/mtasker.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/recursordist/mtasker.hh b/pdns/recursordist/mtasker.hh index a45f64d832..1287e94455 100644 --- a/pdns/recursordist/mtasker.hh +++ b/pdns/recursordist/mtasker.hh @@ -305,7 +305,7 @@ int MTasker::waitEvent(EventKey& key, EventVal* val, un if ((char*)&waiter < d_threads[d_tid].highestStackSeen) { d_threads[d_tid].highestStackSeen = (char*)&waiter; } - key = d_eventkey; + key = std::move(d_eventkey); return d_waitstatus; } -- 2.47.3