From 043f11e891e063f4a2864f4beeb62db028f1663b Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Thu, 17 Oct 2024 12:23:13 +0200 Subject: [PATCH] MINOR: mworker/ocsp: skip ocsp-update proxy init in master The proxy must be created in mworker mode, but only in the worker, not in the master. The current code creates the proxy in both processes. The patch only checks that we are not in the master to start the ocsp-update pre-check. No backport needed. --- src/ssl_ocsp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ssl_ocsp.c b/src/ssl_ocsp.c index 19bb92ac3..323c32e19 100644 --- a/src/ssl_ocsp.c +++ b/src/ssl_ocsp.c @@ -1388,6 +1388,11 @@ static struct task *ssl_ocsp_update_responses(struct task *task, void *context, */ static int ssl_ocsp_update_precheck() { + + /* the ocsp-update is not usable in the master process */ + if (master) + return ERR_NONE; + /* initialize the OCSP update dedicated httpclient */ httpclient_ocsp_update_px = httpclient_create_proxy(""); if (!httpclient_ocsp_update_px)