r2705 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Tue Jun 17 00:10:53 CEST 2008
Author: phk
Date: 2008-06-17 00:10:52 +0200 (Tue, 17 Jun 2008)
New Revision: 2705
Modified:
trunk/varnish-cache/bin/varnishd/cache_fetch.c
trunk/varnish-cache/bin/varnishd/cache_pipe.c
Log:
Make sure backend connections are blocking before we need them to be.
Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2008-06-16 21:58:57 UTC (rev 2704)
+++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2008-06-16 22:10:52 UTC (rev 2705)
@@ -317,10 +317,10 @@
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);
Modified: trunk/varnish-cache/bin/varnishd/cache_pipe.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pipe.c 2008-06-16 21:58:57 UTC (rev 2704)
+++ trunk/varnish-cache/bin/varnishd/cache_pipe.c 2008-06-16 22:10:52 UTC (rev 2705)
@@ -80,6 +80,7 @@
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);
More information about the varnish-commit
mailing list