fix(@desktop/updates): using timeout when checking for new version

This commit is contained in:
Andrei Smirnov 2021-09-07 14:44:58 +03:00 committed by Iuri Matias
parent 4bef4533b6
commit 3902ddf002
2 changed files with 4 additions and 3 deletions

View File

@ -7,3 +7,4 @@ export TMPDIR
export LOGDIR
const APP_UPDATES_ENS* = "desktop.status.eth"
const CHECK_VERSION_TIMEOUT_MS* = 5000

View File

@ -34,7 +34,7 @@ proc getLatestVersion*(): VersionInfo =
# Read version from folder
let secureSSLContext = newContext()
let client = newHttpClient(sslContext = secureSSLContext)
let client = newHttpClient(sslContext = secureSSLContext, timeout = CHECK_VERSION_TIMEOUT_MS)
result.version = client.getContent(url & "/VERSION").strip()
result.url = url