Commit bc71c909 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Automatically wait for servers and clients during reset pass.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2730 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent efe7af72
......@@ -2,20 +2,6 @@
#
# $Id$
varnish v1 -launch
varnish v1 -vcl {
backend s1 {
.host = "localhost";
.port = "9080";
}
sub vcl_recv {
pipe;
}
}
varnish v1 -start
server s1 -repeat 1 {
rxreq
txresp \
......@@ -25,6 +11,16 @@ server s1 -repeat 1 {
-body "012345\n"
}
varnish v1 -launch
varnish v1 -vcl+backend {
sub vcl_recv {
pipe;
}
}
varnish v1 -start
server s1 -start
client c1 {
......@@ -35,6 +31,6 @@ client c1 {
client c1 -run
server s1 -wait
# server s1 -wait
varnish v1 -stop
# varnish v1 -wait
......@@ -167,6 +167,8 @@ cmd_client(char **av, void *priv)
/* Reset and free */
VTAILQ_FOREACH_SAFE(c, &clients, list, c2) {
VTAILQ_REMOVE(&clients, c, list);
if (c->tp != NULL)
client_wait(c);
FREE_OBJ(c);
/* XXX: MEMLEAK */
}
......
......@@ -209,6 +209,8 @@ cmd_server(char **av, void *priv)
/* Reset and free */
VTAILQ_FOREACH_SAFE(s, &servers, list, s2) {
VTAILQ_REMOVE(&servers, s, list);
if (s->sock >= 0)
server_wait(s);
FREE_OBJ(s);
/* XXX: MEMLEAK */
}
......
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