changeset 21857:25d85936a188

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().
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Thu, 30 Mar 2017 23:46:02 +0300
parents a0112b13e73c
children c2ba1f66c449
files src/lib-http/http-client-request.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-http/http-client-request.c	Thu Mar 30 22:29:13 2017 +0200
+++ b/src/lib-http/http-client-request.c	Thu Mar 30 23:46:02 2017 +0300
@@ -555,7 +555,7 @@
 	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 */