Browse Source

Output generator started message as soon as we have the first live server

master
Con Kolivas 9 years ago
parent
commit
b5ea946ef4
  1. 13
      src/generator.c

13
src/generator.c

@ -277,6 +277,10 @@ reconnect:
si = live_server(ckp); si = live_server(ckp);
if (!si) if (!si)
goto out; goto out;
if (unlikely(!started)) {
started = true;
LOGWARNING("%s generator ready", ckp->name);
}
gbt = si->data; gbt = si->data;
cs = &si->cs; cs = &si->cs;
@ -342,10 +346,6 @@ retry:
cs->url, cs->port); cs->url, cs->port);
send_unix_msg(sockd, "failed"); send_unix_msg(sockd, "failed");
} else { } else {
if (unlikely(!started)) {
started = true;
LOGWARNING("%s generator ready", ckp->name);
}
send_unix_msg(sockd, hash); send_unix_msg(sockd, hash);
} }
} else if (cmdmatch(buf, "getlast")) { } else if (cmdmatch(buf, "getlast")) {
@ -362,11 +362,6 @@ retry:
send_unix_msg(sockd, "failed"); send_unix_msg(sockd, "failed");
goto reconnect; goto reconnect;
} else { } else {
if (unlikely(!started)) {
started = true;
LOGWARNING("%s generator ready", ckp->name);
}
send_unix_msg(sockd, hash); send_unix_msg(sockd, hash);
LOGDEBUG("Hash: %s", hash); LOGDEBUG("Hash: %s", hash);
} }

Loading…
Cancel
Save