[master] 54be487be Fail gracefull rather than xxxassert() on lack of worker threads.

Poul-Henning Kamp phk at FreeBSD.org
Wed Mar 6 14:58:07 UTC 2019


commit 54be487be4863decea34f4cf9600789b0c51f838
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Mar 6 14:57:06 2019 +0000

    Fail gracefull rather than xxxassert() on lack of worker threads.
    
    Fixes: #2930

diff --git a/bin/varnishd/http2/cache_http2_session.c b/bin/varnishd/http2/cache_http2_session.c
index ed73f5f31..671d4a01d 100644
--- a/bin/varnishd/http2/cache_http2_session.c
+++ b/bin/varnishd/http2/cache_http2_session.c
@@ -299,7 +299,12 @@ h2_ou_session(struct worker *wrk, struct h2_sess *h2,
 		h2_del_req(wrk, r2);
 		return (0);
 	}
-	XXXAZ(Pool_Task(wrk->pool, &req->task, TASK_QUEUE_REQ));
+	if (Pool_Task(wrk->pool, &req->task, TASK_QUEUE_REQ)) {
+		r2->scheduled = 0;
+		h2_del_req(wrk, r2);
+		VSLb(h2->vsl, SLT_Debug, "H2: No Worker-threads");
+		return (h2_ou_rel(wrk, req));
+	}
 	return (1);
 }
 


More information about the varnish-commit mailing list