From: phk Date: Wed, 23 Jul 2008 15:34:40 +0000 (+0000) Subject: We should not open the shm file until we have a cli connection, it X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4208f43b271e1ffe893cf82bdf445582f6136777;p=varnish We should not open the shm file until we have a cli connection, it might not be there yet. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3000 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishtest/vtc_varnish.c b/varnish-cache/bin/varnishtest/vtc_varnish.c index 60d3c99a..09fecdac 100644 --- a/varnish-cache/bin/varnishtest/vtc_varnish.c +++ b/varnish-cache/bin/varnishtest/vtc_varnish.c @@ -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); + } /**********************************************************************