Commit 3b73cf0e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Close a race where varnishtest::client would attempt to connect before

varnishd::acceptor had called listen(2)

Found and fixed by:	slink aka. Nils Goroll
parent f4f1e8ad
......@@ -376,6 +376,16 @@ ccf_listen_address(struct cli *cli, const char * const *av, void *priv)
(void)cli;
(void)av;
(void)priv;
/*
* This CLI command is primarily used by varnishtest. Don't
* respond until liste(2) has been called, in order to avoid
* a race where varnishtest::client would attempt to connect(2)
* before listen(2) has been called.
*/
while(!hack_ready)
(void)usleep(100*1000);
VTAILQ_FOREACH(ls, &heritage.socks, list) {
if (ls->sock < 0)
continue;
......
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