From: Otto Moerbeek Date: Fri, 11 Feb 2022 09:56:14 +0000 (+0100) Subject: Add back TCP cleanup task that got lost somehow X-Git-Tag: auth-4.7.0-alpha1~9^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F11291%2Fhead;p=thirdparty%2Fpdns.git Add back TCP cleanup task that got lost somehow --- diff --git a/pdns/recursordist/rec-main.cc b/pdns/recursordist/rec-main.cc index e025c610ec..db31fde54a 100644 --- a/pdns/recursordist/rec-main.cc +++ b/pdns/recursordist/rec-main.cc @@ -1873,6 +1873,11 @@ static void houseKeeping(void*) SyncRes::pruneThrottledServers(); }); + static thread_local PeriodicTask pruneTCPTask{"pruneTCPTask", 5}; + pruneThrottledTask.runIfDue(now, [now]() { + t_tcp_manager.cleanup(now); + }); + const auto& info = RecThreadInfo::self(); // Below are the thread specific tasks for the handler and the taskThread