sys: Added timeout setting to curl code. Make splash screen not hang as long

This commit is contained in:
WerWolv
2021-12-17 09:52:58 +01:00
parent b082a28cc4
commit bc53109a1f
4 changed files with 36 additions and 35 deletions

View File

@@ -25,7 +25,7 @@ namespace hex::init {
static bool checkForUpdates() {
hex::Net net;
auto releases = net.getJson(GitHubApiURL + "/releases/latest"s).get();
auto releases = net.getJson(GitHubApiURL + "/releases/latest"s, 200).get();
if (releases.code != 200)
return false;
@@ -45,7 +45,7 @@ namespace hex::init {
static bool downloadInformation() {
hex::Net net;
auto tip = net.getString(ImHexApiURL + "/tip"s).get();
auto tip = net.getString(ImHexApiURL + "/tip"s, 200).get();
if (tip.code != 200)
return false;