created CURL_TIMEOUT constant
and implemented it ofc
This commit is contained in:
parent
6982bb2def
commit
f889bb28e3
@ -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 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 NOT_FOUND_TRIES 10 //NUMBER OF TRIES FOR DOWNLOADING versions.json
|
||||||
|
|
||||||
#define DEPRECATED __attribute__((deprecated)) //SAME COMMENT AS VERSIONS_NAME'S
|
#define DEPRECATED __attribute__((deprecated)) //SAME COMMENT AS VERSIONS_NAME'S
|
||||||
|
@ -86,7 +86,7 @@ _Bool checkVersion()
|
|||||||
//GET versions.json
|
//GET versions.json
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, VERSIONS_URL);
|
curl_easy_setopt(curl, CURLOPT_URL, VERSIONS_URL);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, fileBuffer);
|
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
|
//DOWNLOAD versions.json
|
||||||
curl_easy_perform(curl);
|
curl_easy_perform(curl);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user