From: Francis Dupont Date: Fri, 19 Feb 2021 18:31:49 +0000 (+0100) Subject: [#1661] Fixed idleConnection X-Git-Tag: Kea-1.9.6~118 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc0a165ab3e7818e4524d99e8a3a2c52d42597d5;p=thirdparty%2Fkea.git [#1661] Fixed idleConnection --- diff --git a/src/lib/http/connection.cc b/src/lib/http/connection.cc index 170b372cba..322016570c 100644 --- a/src/lib/http/connection.cc +++ b/src/lib/http/connection.cc @@ -544,6 +544,9 @@ HttpConnection::idleTimeoutCallback() { LOG_DEBUG(http_logger, isc::log::DBGLVL_TRACE_DETAIL, HTTP_IDLE_CONNECTION_TIMEOUT_OCCURRED) .arg(getRemoteEndpointAddressAsText()); + // In theory we should shutdown first and stop/close after but + // it is better to put the connection management responsabilty + // on the client... so simply drop idle connections. stopThisConnection(); } diff --git a/src/lib/http/tests/tls_client_unittests.cc b/src/lib/http/tests/tls_client_unittests.cc index 66fdef35b1..288845fb19 100644 --- a/src/lib/http/tests/tls_client_unittests.cc +++ b/src/lib/http/tests/tls_client_unittests.cc @@ -1170,12 +1170,12 @@ TEST_F(HttpsClientTest, multipleDestinationsMultiThreading) { } // Test that idle connection can be resumed for second request. -TEST_F(HttpsClientTest, DISABLED_idleConnection) { +TEST_F(HttpsClientTest, idleConnection) { ASSERT_NO_FATAL_FAILURE(testIdleConnection()); } // Test that idle connection can be resumed for second request. -TEST_F(HttpsClientTest, DISABLED_idleConnectionMultiThreading) { +TEST_F(HttpsClientTest, idleConnectionMultiThreading) { MultiThreadingMgr::instance().setMode(true); ASSERT_NO_FATAL_FAILURE(testIdleConnection()); }