continue_https_chat(): Update csp->server_connection.request_sent
authorFabian Keil <fk@fabiankeil.de>
Sat, 6 Mar 2021 09:28:59 +0000 (10:28 +0100)
committerFabian Keil <fk@fabiankeil.de>
Fri, 12 Mar 2021 11:34:11 +0000 (12:34 +0100)
... after sending the request to make sure the latency is
calculated correctly.

Previously https connections were not reused after timeout
seconds after the first request made on the connection.

jcc.c

diff --git a/jcc.c b/jcc.c
index 58af472..ee408b3 100644 (file)
--- a/jcc.c
+++ b/jcc.c
@@ -2972,6 +2972,7 @@ static void continue_https_chat(struct client_state *csp)
          csp->cfd);
       return;
    }
+   csp->server_connection.request_sent = time(NULL);
    csp->server_connection.requests_sent_total++;
    handle_established_connection(csp);
    freez(csp->receive_buffer);