Browse Source

Specify what url has been inherited upon restart if possible

master
Con Kolivas 9 years ago
parent
commit
08fcf808a7
  1. 13
      src/ckpool.c

13
src/ckpool.c

@ -1708,6 +1708,7 @@ int main(int argc, char **argv)
if (send_recv_path(path, "ping")) {
for (i = 0; i < ckp.serverurls; i++) {
char oldurl[INET6_ADDRSTRLEN], oldport[8];
char getfd[16];
int sockd;
@ -1719,10 +1720,16 @@ int main(int argc, char **argv)
break;
ckp.oldconnfd[i] = get_fd(sockd);
Close(sockd);
if (!ckp.oldconnfd[i])
sockd = ckp.oldconnfd[i];
if (!sockd)
break;
LOGWARNING("Inherited old server socket %d with new file descriptor %d!",
i, ckp.oldconnfd[i]);
if (url_from_socket(sockd, oldurl, oldport)) {
LOGWARNING("Inherited old server socket %d url %s:%s !",
i, oldurl, oldport);
} else {
LOGWARNING("Inherited old server socket %d with new file descriptor %d!",
i, ckp.oldconnfd[i]);
}
}
send_recv_path(path, "reject");
send_recv_path(path, "reconnect");

Loading…
Cancel
Save