]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1661] Fixed idleConnection
authorFrancis Dupont <fdupont@isc.org>
Fri, 19 Feb 2021 18:31:49 +0000 (19:31 +0100)
committerFrancis Dupont <fdupont@isc.org>
Wed, 24 Mar 2021 08:09:02 +0000 (09:09 +0100)
src/lib/http/connection.cc
src/lib/http/tests/tls_client_unittests.cc

index 170b372cba84bc77114cd3f211c2f7ee830d1c10..322016570c8cbe8e5936a223155fcf9c4c55bf8f 100644 (file)
@@ -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();
 }
 
index 66fdef35b150129d7da68ddf82c2cb3e0b60f7f5..288845fb1984b9a5af732f5452150d097942e80b 100644 (file)
@@ -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());
 }