Browse Source

Drop all clients and reject incoming connections when we fail to talk to the upstream pool in proxy mode

master
Con Kolivas 10 years ago
parent
commit
fd7c115431
  1. 2
      src/generator.c
  2. 2
      src/stratifier.c

2
src/generator.c

@ -1289,6 +1289,8 @@ retry:
break; break;
} }
if (!alive) { if (!alive) {
send_proc(ckp->stratifier, "dropall");
send_proc(ckp->connector, "reject");
if (!ckp->chosen_server) { if (!ckp->chosen_server) {
LOGWARNING("Failed to connect to any servers as proxy, retrying in 5s!"); LOGWARNING("Failed to connect to any servers as proxy, retrying in 5s!");
sleep(5); sleep(5);

2
src/stratifier.c

@ -1090,6 +1090,8 @@ retry:
LOGDEBUG("Stratifier failed to parse dropclient command: %s", buf); LOGDEBUG("Stratifier failed to parse dropclient command: %s", buf);
else else
drop_client(client_id); drop_client(client_id);
} else if (cmdmatch(buf, "dropall")) {
drop_allclients(ckp);
} else if (cmdmatch(buf, "block")) { } else if (cmdmatch(buf, "block")) {
block_solve(ckp); block_solve(ckp);
} else if (cmdmatch(buf, "loglevel")) { } else if (cmdmatch(buf, "loglevel")) {

Loading…
Cancel
Save