summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-18 03:52:02 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-18 03:52:02 +0300
commitd5a295a5ef8338a6d292bb3c60bddcfb8baf17bc (patch)
treedd4493773f5654432220554c1e876bf75a71bd03 /src/net
parentde583a6d0d2a1e2e101d9e10916e72edb23d21b8 (diff)
downloadplus-d5a295a5ef8338a6d292bb3c60bddcfb8baf17bc.tar.gz
plus-d5a295a5ef8338a6d292bb3c60bddcfb8baf17bc.tar.bz2
plus-d5a295a5ef8338a6d292bb3c60bddcfb8baf17bc.tar.xz
plus-d5a295a5ef8338a6d292bb3c60bddcfb8baf17bc.zip
Use fast open in curl.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/download.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp
index d36c59032..9068f15ca 100644
--- a/src/net/download.cpp
+++ b/src/net/download.cpp
@@ -584,6 +584,10 @@ void Download::secureCurl(CURL *const curl A_UNUSED)
curl_easy_setopt(curl, CURLOPT_MAXFILESIZE, 536870912);
#endif // LIBCURL_VERSION_NUM >= 0x070a08
+#if LIBCURL_VERSION_NUM >= 0x073100
+ curl_easy_setopt(curl, CURLOPT_TCP_FASTOPEN, 1L);
+#endif // LIBCURL_VERSION_NUM >= 0x073100
+
curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1L);
curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 60L);
}