Browse Source

Check for presence of main process before trying to ping it in case the socket is pointing a new process

master
Con Kolivas 10 years ago
parent
commit
8d1af2b7fe
  1. 4
      src/ckpool.c

4
src/ckpool.c

@ -350,8 +350,10 @@ bool ping_main(ckpool_t *ckp)
{ {
char *buf; char *buf;
if (unlikely(kill_pid(ckp->main.pid, 0)))
return false;
buf = send_recv_proc(&ckp->main, "ping"); buf = send_recv_proc(&ckp->main, "ping");
if (!buf) if (unlikely(!buf))
return false; return false;
free(buf); free(buf);
return true; return true;

Loading…
Cancel
Save