summaryrefslogtreecommitdiffstats
path: root/src/lib/http
diff options
context:
space:
mode:
authorRazvan Becheriu <razvan@isc.org>2023-03-21 12:47:29 +0100
committerRazvan Becheriu <razvan@isc.org>2023-03-24 11:12:40 +0100
commitafd47676eea31de4aa26e8a0335074c0a6e5352f (patch)
tree50891bba5572d4b3d5f83168defb90394e082c92 /src/lib/http
parent[2785] Regen flex and bison (diff)
downloadkea-afd47676eea31de4aa26e8a0335074c0a6e5352f.tar.xz
kea-afd47676eea31de4aa26e8a0335074c0a6e5352f.zip
[#2799] call setMode only on config-set
Diffstat (limited to 'src/lib/http')
-rw-r--r--src/lib/http/client.cc8
-rw-r--r--src/lib/http/tests/client_mt_unittests.cc6
2 files changed, 0 insertions, 14 deletions
diff --git a/src/lib/http/client.cc b/src/lib/http/client.cc
index 6f41b5ad02..42385ed27e 100644
--- a/src/lib/http/client.cc
+++ b/src/lib/http/client.cc
@@ -1949,14 +1949,6 @@ private:
HttpClient::HttpClient(IOService& io_service, size_t thread_pool_size,
bool defer_thread_start /* = false */) {
- if (thread_pool_size > 0) {
- if (!MultiThreadingMgr::instance().getMode()) {
- isc_throw(InvalidOperation,
- "HttpClient thread_pool_size must be zero"
- "when Kea core multi-threading is disabled");
- }
- }
-
impl_.reset(new HttpClientImpl(io_service, thread_pool_size,
defer_thread_start));
}
diff --git a/src/lib/http/tests/client_mt_unittests.cc b/src/lib/http/tests/client_mt_unittests.cc
index b483273563..e6b98556e6 100644
--- a/src/lib/http/tests/client_mt_unittests.cc
+++ b/src/lib/http/tests/client_mt_unittests.cc
@@ -844,12 +844,6 @@ TEST_F(MultiThreadingHttpClientTest, basics) {
// Make sure destruction doesn't throw.
ASSERT_NO_THROW_LOG(client.reset());
- // Non-zero thread-pool-size means multi-threaded mode, should throw.
- ASSERT_THROW_MSG(client.reset(new HttpClient(io_service_, 1)), InvalidOperation,
- "HttpClient thread_pool_size must be zero"
- "when Kea core multi-threading is disabled");
- ASSERT_FALSE(client);
-
// Enable Kea core multi-threading.
MultiThreadingMgr::instance().setMode(true);