From ed4b05105372a8745a0e4493f7fb0fe41742ab12 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 18 Jul 2020 14:04:11 +0200 Subject: [PATCH] receive_encrypted_request(): Use the socket-timeout when waiting for new data Previously the keep-alive-timeout was being used which was inappropriate as we are waiting for data that belongs to the same request. Sponsored by: Robert Klemme --- jcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jcc.c b/jcc.c index 511b36be..69c01808 100644 --- a/jcc.c +++ b/jcc.c @@ -2221,7 +2221,7 @@ static jb_err receive_encrypted_request(struct client_state *csp) { log_error(LOG_LEVEL_HEADER, "Reading encrypted headers"); if (!is_ssl_pending(&(csp->mbedtls_client_attr.ssl)) && - !data_is_available(csp->cfd, (int)csp->config->keep_alive_timeout)) + !data_is_available(csp->cfd, csp->config->socket_timeout)) { log_error(LOG_LEVEL_CONNECT, "Socket %d timed out while waiting for client headers", csp->cfd); -- 2.39.2