Browse Source

Make cURL use a connection timeout rather than total timeout.

tags/v2.0.1
Andrew Belt 2 years ago
parent
commit
8e1bb81d78
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/network.cpp

+ 2
- 2
src/network.cpp View File

@@ -24,8 +24,8 @@ static CURL* createCurl() {

// curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, true);
// 65 second timeout for requests, just a bit over the typical HTTP default.
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 65);
// 65 second timeout for connections, just a bit over the typical HTTP default.
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 65);

// If curl can't resolve a DNS entry, it sends a signal to interrupt the process.
// However, since we use curl on non-main thread, this crashes the application.


Loading…
Cancel
Save