From: Timo Sirainen Date: Thu, 30 Mar 2017 20:46:02 +0000 (+0300) Subject: lib-http: http_client_request_delay_from_response() should use per-request timeout... X-Git-Tag: 2.3.0.rc1~1824 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eed02e3be957727e44afac3c20ab64ed80cc8644;p=thirdparty%2Fdovecot%2Fcore.git lib-http: http_client_request_delay_from_response() should use per-request timeout as max 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(). --- diff --git a/src/lib-http/http-client-request.c b/src/lib-http/http-client-request.c index f39858683b..71294e9fa8 100644 --- a/src/lib-http/http-client-request.c +++ b/src/lib-http/http-client-request.c @@ -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 */