]> err.no Git - varnish/commitdiff
Make sure backend connections are blocking before we need them to be.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 16 Jun 2008 22:10:52 +0000 (22:10 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 16 Jun 2008 22:10:52 +0000 (22:10 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2705 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_fetch.c
varnish-cache/bin/varnishd/cache_pipe.c

index 19aa52088c6d185835a7b86654a81c8951e6b212..40c61d7c62d7c21b82f2909ab85a46a405ebbd37 100644 (file)
@@ -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);
 
index d62d62c18c3bea45cef65669d3d198057298b548..42794c0c373a28b2e6d192ae943a2f34f2304aed 100644 (file)
@@ -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);