]> err.no Git - varnish/commitdiff
Merge r3492: master-2.0
authortfheen <tfheen@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 28 Jan 2009 15:09:40 +0000 (15:09 +0000)
committertfheen <tfheen@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 28 Jan 2009 15:09:40 +0000 (15:09 +0000)
Be more stringent about our timeout: fail even if we did get a
socket, but took to.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/branches/2.0@3563 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_backend_poll.c

index 659ba2bdfa0a86b7029b15f0387c0d5fc4ab92ee..67b6a13a9bcc45a732aa26bc2f37f698fb5a8da5 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);