Unified timeout parameter processing

Fixed processing of MHD_OPTION_CONNECTION_TIMEOUT option.
This commit is contained in:
Evgeny Grin (Karlson2k) committed 2021-10-31 17:38:41 +03:00
1 parent e1d1558570
commit 0187a69d4a
1 file changed
+2 -3
+2 -3
View File
@@ -5645,14 +5645,13 @@ parse_options_va (struct MHD_Daemon *daemon,
#ifdef HAVE_MESSAGES
MHD_DLOG (daemon,
_ ("The specified connection timeout (%u) is too large. " \
"Maximum allowed value (" PRIu64 ") will be used " \
"Maximum allowed value (%" PRIu64 ") will be used " \
"instead.\n"),
uv,
(UINT64_MAX / 2000 - 1));
#endif
daemon->connection_timeout_ms = UINT64_MAX / 2000 - 1;
uv = UINT64_MAX / 2000 - 1;
}
else
#endif /* (SIZEOF_UINT64_T - 1) <= SIZEOF_UNSIGNED_INT */
daemon->connection_timeout_ms = uv * 1000;
break;