From c4680466511f6fe9967d9647e629c5ea7f16d0fc Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 27 Feb 2016 09:43:16 +1100 Subject: [PATCH] Read oldpid in handover mode before getting handover --- src/ckpool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ckpool.c b/src/ckpool.c index 0ee16a78..85ca432c 100644 --- a/src/ckpool.c +++ b/src/ckpool.c @@ -1824,6 +1824,7 @@ int main(int argc, char **argv) ckp.main.sockname = strdup("listener"); name_process_sockname(&ckp.main.us, &ckp.main); ckp.oldconnfd = ckzalloc(sizeof(int *) * ckp.serverurls); + manage_old_instance(&ckp, &ckp.main); if (ckp.handover) { const char *path = ckp.main.us.path; @@ -1872,8 +1873,6 @@ int main(int argc, char **argv) } } - if (!ckp.handover) - manage_old_instance(&ckp, &ckp.main); write_namepid(&ckp.main); open_process_sock(&ckp, &ckp.main, &ckp.main.us); launch_logger(&ckp);