When sockd transfers a file descriptor to ndhc, close the fd in sockd.
Since the transfer is conceptually a move, this is the correct thing to do and prevents sockets from spuriously hanging around forever and eventually exhausting the per process limit on fds.
This commit is contained in:
parent
07cbd88049
commit
034e2bb1db
@ -439,6 +439,7 @@ static void xfer_fd(int fd, char cmd)
|
|||||||
suicide("%s: (%s) sendmsg failed: %s", client_config.interface,
|
suicide("%s: (%s) sendmsg failed: %s", client_config.interface,
|
||||||
__func__, strerror(errno));
|
__func__, strerror(errno));
|
||||||
}
|
}
|
||||||
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static size_t execute_sockd(char *buf, size_t buflen)
|
static size_t execute_sockd(char *buf, size_t buflen)
|
||||||
|
Loading…
Reference in New Issue
Block a user