From 4b50fee50ba442515df365d8c1555f1748541858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Obiltschnig?= Date: Mon, 5 Mar 2018 22:13:30 +0100 Subject: [PATCH] revert fix for #2088 as it breaks testsuite --- Net/src/TCPServerDispatcher.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Net/src/TCPServerDispatcher.cpp b/Net/src/TCPServerDispatcher.cpp index dd36c29b9..5cdc4098e 100644 --- a/Net/src/TCPServerDispatcher.cpp +++ b/Net/src/TCPServerDispatcher.cpp @@ -96,7 +96,7 @@ void TCPServerDispatcher::release() void TCPServerDispatcher::run() { - AutoPtr guard(this, false); // ensure _rc is decreased when function exits + AutoPtr guard(this, true); // ensure object stays alive int idleTime = (int) _pParams->getThreadIdleTime().totalMilliseconds(); @@ -149,10 +149,6 @@ void TCPServerDispatcher::enqueue(const StreamSocket& socket) { _threadPool.startWithPriority(_pParams->getThreadPriority(), *this, threadName); ++_currentThreads; - // Ensure this object lives at least until run() starts - // Small chance of leaking if threadpool is stopped before this - // work runs, but better than a dangling pointer and crash! - duplicate(); } catch (Poco::Exception&) {