Commit 2ddd2027 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

We should not open the shm file until we have a cli connection, it

might not be there yet.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3000 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 251678f5
...@@ -221,8 +221,6 @@ varnish_launch(struct varnish *v) ...@@ -221,8 +221,6 @@ varnish_launch(struct varnish *v)
vsb_delete(vsb); vsb_delete(vsb);
AZ(pthread_create(&v->tp, NULL, varnish_thread, v)); AZ(pthread_create(&v->tp, NULL, varnish_thread, v));
v->stats = VSL_OpenStats(v->name);
vtc_log(v->vl, 3, "opening CLI connection"); vtc_log(v->vl, 3, "opening CLI connection");
for (i = 0; i < 10; i++) { for (i = 0; i < 10; i++) {
(void)usleep(200000); (void)usleep(200000);
...@@ -237,6 +235,8 @@ varnish_launch(struct varnish *v) ...@@ -237,6 +235,8 @@ varnish_launch(struct varnish *v)
} }
vtc_log(v->vl, 3, "CLI connection fd = %d", v->cli_fd); vtc_log(v->vl, 3, "CLI connection fd = %d", v->cli_fd);
assert(v->cli_fd >= 0); assert(v->cli_fd >= 0);
v->stats = VSL_OpenStats(v->name);
} }
/********************************************************************** /**********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment