[PATCH] Log FetchError on vcl_pipe if no backend is avail

Federico G. Schwindt fgsch at lodoss.net
Tue Mar 11 19:28:13 CET 2014


  Log on error rather than silently returning. Same as in V1F_fetch_hdr().

  f.-

 bin/varnishd/cache/cache_pipe.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bin/varnishd/cache/cache_pipe.c b/bin/varnishd/cache/cache_pipe.c
index b4403bb..a74f745 100644
--- a/bin/varnishd/cache/cache_pipe.c
+++ b/bin/varnishd/cache/cache_pipe.c
@@ -74,8 +74,10 @@ PipeRequest(struct req *req, struct busyobj *bo)
 	CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
 
 	vc = VDI_GetFd(bo);
-	if (vc == NULL)
+	if (vc == NULL) {
+		VSLb(bo->vsl, SLT_FetchError, "no backend connection");
 		return;
+	}
 	bo->vbc = vc;		/* For panic dumping */
 	(void)VTCP_blocking(vc->fd);
 



More information about the varnish-dev mailing list