]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: http_client_request_delay_from_response() should use per-request timeout...
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 30 Mar 2017 20:46:02 +0000 (23:46 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 30 Mar 2017 20:46:02 +0000 (23:46 +0300)
It was using the global request_timeout_msecs for the maximum timeout,
which could be different from the per-request timeout set by
http_client_request_set_attempt_timeout_msecs().

src/lib-http/http-client-request.c

index f39858683b061a404b6af4092b96a10ab66f85e6..71294e9fa85e88995b4bd9c0c58212e029c18cb2 100644 (file)
@@ -555,7 +555,7 @@ int http_client_request_delay_from_response(struct http_client_request *req,
        if (retry_after < ioloop_time)
                return 0;  /* delay already expired */
        max = (req->client->set.max_auto_retry_delay == 0 ?
-               req->client->set.request_timeout_msecs / 1000 :
+               req->attempt_timeout_msecs / 1000 :
                req->client->set.max_auto_retry_delay);
        if ((unsigned int)(retry_after - ioloop_time) > max)
                return -1; /* delay too long */