From: Francis Dupont Date: Fri, 23 Apr 2021 10:47:07 +0000 (+0200) Subject: [(no branch, rebasing 1798-remove-tls-stream-clear-operation)] [#1798] Reapplied... X-Git-Tag: Kea-1.9.8~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63fa6da1880a2e36ffccdef174a292e1977f715b;p=thirdparty%2Fkea.git [(no branch, rebasing 1798-remove-tls-stream-clear-operation)] [#1798] Reapplied #1807 patch --- diff --git a/src/lib/http/connection_pool.cc b/src/lib/http/connection_pool.cc index 16cb54f5a0..de92eb20e6 100644 --- a/src/lib/http/connection_pool.cc +++ b/src/lib/http/connection_pool.cc @@ -39,7 +39,13 @@ HttpConnectionPool::stop(const HttpConnectionPtr& connection) { void HttpConnectionPool::shutdown(const HttpConnectionPtr& connection) { - connections_.remove(connection); + if (util::MultiThreadingMgr::instance().getMode()) { + std::lock_guard lk(mutex_); + connections_.remove(connection); + } else { + connections_.remove(connection); + } + connection->shutdown(); }