From: Timo Sirainen Date: Mon, 10 Apr 2017 09:53:43 +0000 (+0300) Subject: lib-http: Track request's first and last send attempt times separately. X-Git-Tag: 2.3.0.rc1~1761 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0452e0b310ddc74d84c2492f72fea41ffcb96a8;p=thirdparty%2Fdovecot%2Fcore.git lib-http: Track request's first and last send attempt times separately. --- diff --git a/src/lib-http/http-client-private.h b/src/lib-http/http-client-private.h index 699ff5e56a..24d76867f0 100644 --- a/src/lib-http/http-client-private.h +++ b/src/lib-http/http-client-private.h @@ -97,6 +97,7 @@ struct http_client_request { struct timeval release_time; struct timeval submit_time; + struct timeval first_sent_time; struct timeval sent_time; struct timeval response_time; struct timeval timeout_time; diff --git a/src/lib-http/http-client-request.c b/src/lib-http/http-client-request.c index cdc6100c18..e14f942717 100644 --- a/src/lib-http/http-client-request.c +++ b/src/lib-http/http-client-request.c @@ -1187,6 +1187,8 @@ static int http_client_request_send_real(struct http_client_request *req, iov[2].iov_len = 2; req->state = HTTP_REQUEST_STATE_PAYLOAD_OUT; + if (req->first_sent_time.tv_sec == 0) + req->first_sent_time = ioloop_timeval; req->sent_time = ioloop_timeval; req->sent_lock_usecs = file_lock_wait_get_total_usecs(); req->sent_global_ioloop_usecs = ioloop_global_wait_usecs;