From 0623410889faeb6b0ff2df4bff584920dbe59ab8 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 8 Jun 2014 16:33:16 +1000 Subject: [PATCH] Ping main on looking for the generator response in the stratifier to know if we've died before ever starting --- src/stratifier.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/stratifier.c b/src/stratifier.c index 9afcb4f4..fd48fbef 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -2088,6 +2088,10 @@ int stratifier(proc_instance_t *pi) /* Wait for the generator to have something for us */ do { + if (!ping_main(ckp)) { + ret = 1; + goto out; + } buf = send_recv_proc(ckp->generator, "ping"); } while (!buf); dealloc(buf); @@ -2114,5 +2118,6 @@ int stratifier(proc_instance_t *pi) load_users(ckp); ret = stratum_loop(ckp, pi); +out: return process_exit(ckp, pi, ret); }