Commit 65ac5c7e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Increase CLI respone timeout to 5 seconds and tell that

a ping has failed before we kill the child.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1067 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 3b5943b7
...@@ -86,8 +86,10 @@ child_poker(struct ev *e, int what) ...@@ -86,8 +86,10 @@ child_poker(struct ev *e, int what)
(void)what; (void)what;
if (child_state != CH_RUNNING) if (child_state != CH_RUNNING)
return (1); 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); kill(child_pid, SIGKILL);
}
return (0); return (0);
} }
......
...@@ -212,7 +212,7 @@ mgt_cli_askchild(unsigned *status, char **resp, const char *fmt, ...) ...@@ -212,7 +212,7 @@ mgt_cli_askchild(unsigned *status, char **resp, const char *fmt, ...)
return (CLIS_COMMS); return (CLIS_COMMS);
} }
i = cli_readres(cli_i, &u, resp, 3.0); i = cli_readres(cli_i, &u, resp, 5.0);
if (status != NULL) if (status != NULL)
*status = u; *status = u;
return (u == CLIS_OK ? 0 : u); return (u == CLIS_OK ? 0 : u);
......
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