Skip to content

Commit e657730

Browse files
authored
vine: close transfer link in the server process (#4076)
1 parent a27e4c5 commit e657730

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

taskvine/src/worker/vine_transfer_server.c

+5
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ static void vine_transfer_process(struct vine_cache *cache)
8585
}
8686
_exit(0);
8787
} else {
88+
/* Also close the link in the parent process, otherwise the opened file descriptors will not be closed.
89+
* This caused a problem where incoming transfers were all failing due to the file descriptor limit per process being reached. */
90+
if (lnk) {
91+
link_close(lnk);
92+
}
8893
if (child_count < VINE_TRANSFER_PROC_MAX_CHILD) {
8994
while (waitpid(-1, NULL, WNOHANG) > 0) {
9095
child_count--;

0 commit comments

Comments
 (0)