r3043 - trunk/varnish-cache/bin/varnishtest

phk at projects.linpro.no phk at projects.linpro.no
Thu Jul 31 12:35:36 CEST 2008


Author: phk
Date: 2008-07-31 12:35:35 +0200 (Thu, 31 Jul 2008)
New Revision: 3043

Modified:
   trunk/varnish-cache/bin/varnishtest/vtc_client.c
Log:
Ok, 3 retries then...



Modified: trunk/varnish-cache/bin/varnishtest/vtc_client.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_client.c	2008-07-31 10:24:19 UTC (rev 3042)
+++ trunk/varnish-cache/bin/varnishtest/vtc_client.c	2008-07-31 10:35:35 UTC (rev 3043)
@@ -69,6 +69,7 @@
 	struct client *c;
 	struct vtclog *vl;
 	int fd = -1;
+	int i;
 
 	CAST_OBJ_NOTNULL(c, priv, CLIENT_MAGIC);
 	AN(c->connect);
@@ -78,7 +79,7 @@
 	vtc_log(vl, 2, "Started");
 	vtc_log(vl, 3, "Connect to %s", c->connect);
 	fd = VSS_open(c->connect);
-	if (fd < 0) {
+	for (i = 0; fd < 0 && i < 3; i++) {
 		sleep(1);
 		fd = VSS_open(c->connect);
 	}




More information about the varnish-commit mailing list