]> err.no Git - varnish/commitdiff
Be more stringent about our timeout: fail even if we did get a
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 21 Dec 2008 18:35:24 +0000 (18:35 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 21 Dec 2008 18:35:24 +0000 (18:35 +0000)
socket, but took to.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3492 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_backend_poll.c

index dc8423fad8a588275827d154dc1a3e5c8b9ad2fa..3c07f566280732bdfd048fd9776b0c26b9c51197 100644 (file)
@@ -157,6 +157,11 @@ vbp_poke(struct vbp_target *vt)
                /* Got no connection: failed */
                return;
        }
+       if (tmo <= 0) {
+               /* Spent too long time getting it */
+               TCP_close(&s);
+               return;
+       }
 
        /* Send the request */
        i = write(s, vt->req, vt->req_len);