summaryrefslogtreecommitdiff
path: root/networking/wget.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/wget.c')
-rw-r--r--networking/wget.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/networking/wget.c b/networking/wget.c
index 653d807..7a46505 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -1091,6 +1091,12 @@ static void download_one_url(const char *url)
}
fflush(sfp);
+ /* If we use SSL helper, keeping our end of the socket open for writing
+ * makes our end (i.e. the same fd!) readable (EAGAIN instead of EOF)
+ * even after child closes its copy of the fd.
+ * This helps:
+ */
+ shutdown(fileno(sfp), SHUT_WR);
/*
* Retrieve HTTP response line and check for "200" status code.