mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-05 04:56:10 +02:00
MINOR: acme: allow a delay after a valid response
Use the retryafter value to set a delay before doing the next request when the previous response was valid.
This commit is contained in:
parent
18d2371e0d
commit
f7cae0e55b
13
src/acme.c
13
src/acme.c
@ -1936,7 +1936,18 @@ nextreq:
|
||||
/* this is called when changing step in the state machine */
|
||||
http_st = ACME_HTTP_REQ;
|
||||
ctx->retries = ACME_RETRY; /* reinit the retries */
|
||||
goto re; /* optimize by not leaving the task for the next httpreq to init */
|
||||
|
||||
if (ctx->retryafter == 0)
|
||||
goto re; /* optimize by not leaving the task for the next httpreq to init */
|
||||
|
||||
/* if we have a retryafter, wait before next request (usually finalize) */
|
||||
task->expire = tick_add(now_ms, ctx->retryafter * 1000);
|
||||
ctx->retryafter = 0;
|
||||
ctx->http_state = http_st;
|
||||
ctx->state = st;
|
||||
|
||||
MT_LIST_UNLOCK_FULL(&ctx->el, tmp);
|
||||
return task;
|
||||
|
||||
retry:
|
||||
ctx->http_state = ACME_HTTP_REQ;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user