r3492 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Sun Dec 21 19:35:24 CET 2008


Author: phk
Date: 2008-12-21 19:35:24 +0100 (Sun, 21 Dec 2008)
New Revision: 3492

Modified:
   trunk/varnish-cache/bin/varnishd/cache_backend_poll.c
Log:
Be more stringent about our timeout: fail even if we did get a
socket, but took to.



Modified: trunk/varnish-cache/bin/varnishd/cache_backend_poll.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_backend_poll.c	2008-12-21 18:34:39 UTC (rev 3491)
+++ trunk/varnish-cache/bin/varnishd/cache_backend_poll.c	2008-12-21 18:35:24 UTC (rev 3492)
@@ -157,6 +157,11 @@
 		/* 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);



More information about the varnish-commit mailing list