You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by sz...@apache.org on 2022/08/23 19:09:58 UTC
[nifi-minifi-cpp] 02/03: MINIFICPP-1906 Restore original timeout for CivetServer
This is an automated email from the ASF dual-hosted git repository.
szaszm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit daf3aa8b35bb68af0edcab1517c4715bdea2bc31
Author: Gabor Gyimesi <ga...@gmail.com>
AuthorDate: Tue Aug 23 21:06:20 2022 +0200
MINIFICPP-1906 Restore original timeout for CivetServer
There was a change in CivetWeb (commit hash: a7361235) where a
previously used poll function with constant timeout of 200 ms was
replaced with the mg_poll function. This function uses the
SOCKET_TIMEOUT_QUANTUM constant for the timeout value of a single poll
call. The default value of this constant is 2000 ms and due to this the
shutdown of the CivetServer had to wait 10 times more for the ongoing
poll to finish in every single test case, which increased the runtime of
the test cases. The SOCKET_TIMEOUT_QUANTUM is changed back to 200 ms in
this PR.
Closes #1403
Signed-off-by: Marton Szasz <sz...@apache.org>
---
cmake/CivetWeb.cmake | 1 +
1 file changed, 1 insertion(+)
diff --git a/cmake/CivetWeb.cmake b/cmake/CivetWeb.cmake
index dc7cc4b19..effc81564 100644
--- a/cmake/CivetWeb.cmake
+++ b/cmake/CivetWeb.cmake
@@ -35,6 +35,7 @@ FetchContent_MakeAvailable(civetweb)
add_dependencies(civetweb-c-library OpenSSL::Crypto OpenSSL::SSL)
add_dependencies(civetweb-cpp OpenSSL::Crypto OpenSSL::SSL)
+target_compile_definitions(civetweb-c-library PRIVATE SOCKET_TIMEOUT_QUANTUM=200)
if (NOT WIN32)
target_compile_options(civetweb-c-library PRIVATE -Wno-error)
target_compile_options(civetweb-cpp PRIVATE -Wno-error)