From 6be3c0068456d49c2c09c65d44b8d8fac1c7bd30 Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 16 Jun 2008 22:10:52 +0000 Subject: [PATCH] Make sure backend connections are blocking before we need them to be. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2705 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_fetch.c | 2 +- varnish-cache/bin/varnishd/cache_pipe.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/varnish-cache/bin/varnishd/cache_fetch.c b/varnish-cache/bin/varnishd/cache_fetch.c index 19aa5208..40c61d7c 100644 --- a/varnish-cache/bin/varnishd/cache_fetch.c +++ b/varnish-cache/bin/varnishd/cache_fetch.c @@ -317,10 +317,10 @@ Fetch(struct sess *sp) st->len = st->space; WS_Assert(sp->obj->ws_o); http_Setup(sp->obj->http, sp->obj->ws_o); - vc = VBE_GetFd(sp); if (vc == NULL) return (__LINE__); + TCP_blocking(vc->fd); /* XXX: we should timeout instead */ WRK_Reset(w, &vc->fd); http_Write(w, hp, 0); diff --git a/varnish-cache/bin/varnishd/cache_pipe.c b/varnish-cache/bin/varnishd/cache_pipe.c index d62d62c1..42794c0c 100644 --- a/varnish-cache/bin/varnishd/cache_pipe.c +++ b/varnish-cache/bin/varnishd/cache_pipe.c @@ -80,6 +80,7 @@ PipeSession(struct sess *sp) vc = VBE_GetFd(sp); if (vc == NULL) return; + TCP_blocking(vc->fd); WRK_Reset(w, &vc->fd); w->acct.hdrbytes += http_Write(w, bereq->http, 0); -- 2.39.5