[master] 3a22f5f0d allow bgthreads to terminate for vmod use

Nils Goroll nils.goroll at uplex.de
Tue Aug 9 16:08:07 UTC 2022


commit 3a22f5f0ded31f8c7340ac00a382ae9106c20a8c
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Tue Aug 9 17:25:01 2022 +0200

    allow bgthreads to terminate for vmod use

diff --git a/bin/varnishd/cache/cache_wrk.c b/bin/varnishd/cache/cache_wrk.c
index e8e6f6154..9671413b6 100644
--- a/bin/varnishd/cache/cache_wrk.c
+++ b/bin/varnishd/cache/cache_wrk.c
@@ -89,7 +89,6 @@ wrk_bgthread(void *arg)
 	struct worker wrk;
 	struct worker_priv wpriv[1];
 	struct VSC_main_wrk ds;
-	void *r;
 
 	CAST_OBJ_NOTNULL(bt, arg, BGTHREAD_MAGIC);
 	THR_SetName(bt->name);
@@ -100,12 +99,7 @@ wrk_bgthread(void *arg)
 	memset(&ds, 0, sizeof ds);
 	wrk.stats = &ds;
 
-	r = bt->func(&wrk, bt->priv);
-
-	if (! cache_shutdown)
-		WRONG("BgThread terminated");
-
-	return (r);
+	return (bt->func(&wrk, bt->priv));
 }
 
 void


More information about the varnish-commit mailing list