From: phk Date: Mon, 16 Jun 2008 22:10:52 +0000 (+0000) Subject: Make sure backend connections are blocking before we need them to be. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6be3c0068456d49c2c09c65d44b8d8fac1c7bd30;p=varnish 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 --- 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);