]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: Track request's first and last send attempt times separately.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 10 Apr 2017 09:53:43 +0000 (12:53 +0300)
committerGitLab <gitlab@git.dovecot.net>
Mon, 10 Apr 2017 10:26:37 +0000 (13:26 +0300)
src/lib-http/http-client-private.h
src/lib-http/http-client-request.c

index 699ff5e56ab6e3a8b9931d608116b5c8a7757a39..24d76867f0efd282a5a0a77e1b329d4a687019d5 100644 (file)
@@ -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;
index cdc6100c1899933936b42c7a8136be2d2999c275..e14f9427178803ec8ec400e1ed9adc8745cfb5ea 100644 (file)
@@ -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;