summaryrefslogtreecommitdiff
path: root/libfetch/ftp.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2023-04-17 15:39:04 +0300
committerTimo Teräs <timo.teras@iki.fi>2023-05-02 13:20:12 +0300
commit71ea076197410f7f1043762931b67338055a139e (patch)
tree4101290b7aab166aa59983b2bd4b60877a495136 /libfetch/ftp.c
parent06fef8ad8a936269a1868cbe1421ac72797f9a3e (diff)
downloadapk-tools-71ea076197410f7f1043762931b67338055a139e.tar.gz
apk-tools-71ea076197410f7f1043762931b67338055a139e.tar.bz2
apk-tools-71ea076197410f7f1043762931b67338055a139e.tar.xz
apk-tools-71ea076197410f7f1043762931b67338055a139e.zip
fetch: enable --timeout to set network progress timeout
implement it also for connecting to hosts fixes #10869
Diffstat (limited to 'libfetch/ftp.c')
-rw-r--r--libfetch/ftp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libfetch/ftp.c b/libfetch/ftp.c
index 77790aa..14323dc 100644
--- a/libfetch/ftp.c
+++ b/libfetch/ftp.c
@@ -692,7 +692,7 @@ ftp_transfer(conn_t *conn, const char *oper, const char *file, const char *op_ar
retry_mode:
/* open data socket */
- if ((sd = socket(u.ss.ss_family, SOCK_STREAM, IPPROTO_TCP)) == -1) {
+ if ((sd = socket(u.ss.ss_family, SOCK_STREAM | SOCK_CLOEXEC, IPPROTO_TCP)) == -1) {
fetch_syserr();
return (NULL);
}