created CURL_TIMEOUT constant

and implemented it ofc
This commit is contained in:
Václav Šmejkal 2022-08-25 12:02:16 +02:00
parent 6982bb2def
commit f889bb28e3
No known key found for this signature in database
GPG Key ID: FD749A97DF2D5E19
2 changed files with 2 additions and 1 deletions

View File

@ -25,6 +25,7 @@ const enum EXIT_CODES //exit codes you fucking idiot
#define CLEAR_SCREEN "\e[1;1H\e[2J" //TEXT FOR UNIX CLEAR SCREEN
#define CURL_TIMEOUT 3 //if you need comment explaining, what the fuck is timeout, don't change WHY2's code, alright? thx, love ya
#define NOT_FOUND_TRIES 10 //NUMBER OF TRIES FOR DOWNLOADING versions.json
#define DEPRECATED __attribute__((deprecated)) //SAME COMMENT AS VERSIONS_NAME'S

View File

@ -86,7 +86,7 @@ _Bool checkVersion()
//GET versions.json
curl_easy_setopt(curl, CURLOPT_URL, VERSIONS_URL);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, fileBuffer);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 3);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, CURL_TIMEOUT);
//DOWNLOAD versions.json
curl_easy_perform(curl);