]> err.no Git - varnish/commitdiff
Increase CLI respone timeout to 5 seconds and tell that
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 18 Sep 2006 09:33:10 +0000 (09:33 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 18 Sep 2006 09:33:10 +0000 (09:33 +0000)
a ping has failed before we kill the child.

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

varnish-cache/bin/varnishd/mgt_child.c
varnish-cache/bin/varnishd/mgt_cli.c

index f9e9b24b6548c65de5613a2c00d7110192247108..7a029e95ce74bd85d6e91805e247927dc6032120 100644 (file)
@@ -86,8 +86,10 @@ child_poker(struct ev *e, int what)
        (void)what;
        if (child_state != CH_RUNNING)
                return (1);
-       if (child_pid > 0 && mgt_cli_askchild(NULL, NULL, "ping\n"))
+       if (child_pid > 0 && mgt_cli_askchild(NULL, NULL, "ping\n")) {
+               fprintf(stderr, "Child not responding to ping\n");
                kill(child_pid, SIGKILL);
+       }
        return (0);
 }
 
index 64f4f45bf0d4679ec616377c7ad51d72f0e33f73..536c7f77fa85d9f5b58967ebf8738fb83cbe5446 100644 (file)
@@ -212,7 +212,7 @@ mgt_cli_askchild(unsigned *status, char **resp, const char *fmt, ...)
                return (CLIS_COMMS);
        }
 
-       i = cli_readres(cli_i, &u, resp, 3.0);
+       i = cli_readres(cli_i, &u, resp, 5.0);
        if (status != NULL)
                *status = u;
        return (u == CLIS_OK ? 0 : u);