Permalink
Browse files

Disable connection persistence and enable a 5 second connect timeout

  • Loading branch information...
1 parent 1278277 commit 23b152e71a5b9824612a6e513d7c8118a51240c8 @cgutman cgutman committed May 9, 2016
Showing with 6 additions and 0 deletions.
  1. +6 −0 libgamestream/http.c
@@ -76,6 +76,12 @@ int http_request(char* url, PHTTP_DATA data) {
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, _write_curl);
curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1L);
curl_easy_setopt(curl, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function);
+ curl_easy_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE, 0L);
+ curl_easy_setopt(curl, CURLOPT_MAXCONNECTS, 0L);
+ curl_easy_setopt(curl, CURLOPT_FRESH_CONNECT, 1L);
+ curl_easy_setopt(curl, CURLOPT_FORBID_REUSE, 1L);
+ curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 5L);
+ curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1L);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, data);
curl_easy_setopt(curl, CURLOPT_URL, url);

0 comments on commit 23b152e

Please sign in to comment.