]> err.no Git - varnish/commitdiff
We should not open the shm file until we have a cli connection, it
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 23 Jul 2008 15:34:40 +0000 (15:34 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 23 Jul 2008 15:34:40 +0000 (15:34 +0000)
might not be there yet.

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

varnish-cache/bin/varnishtest/vtc_varnish.c

index 60d3c99a6fbf2c8fffba931b722b45c267cf33b0..09fecdacb3f0eb4f9c63253aa2cb8965eb350b95 100644 (file)
@@ -221,8 +221,6 @@ varnish_launch(struct varnish *v)
        vsb_delete(vsb);
        AZ(pthread_create(&v->tp, NULL, varnish_thread, v));
 
-       v->stats = VSL_OpenStats(v->name);
-
        vtc_log(v->vl, 3, "opening CLI connection");
        for (i = 0; i < 10; i++) {
                (void)usleep(200000);
@@ -237,6 +235,8 @@ varnish_launch(struct varnish *v)
        }
        vtc_log(v->vl, 3, "CLI connection fd = %d", v->cli_fd);
        assert(v->cli_fd >= 0);
+       v->stats = VSL_OpenStats(v->name);
+
 }
 
 /**********************************************************************