fix(@desktop/updates): using timeout when checking for new version
This commit is contained in:
parent
4bef4533b6
commit
3902ddf002
|
@ -7,3 +7,4 @@ export TMPDIR
|
||||||
export LOGDIR
|
export LOGDIR
|
||||||
|
|
||||||
const APP_UPDATES_ENS* = "desktop.status.eth"
|
const APP_UPDATES_ENS* = "desktop.status.eth"
|
||||||
|
const CHECK_VERSION_TIMEOUT_MS* = 5000
|
||||||
|
|
|
@ -34,7 +34,7 @@ proc getLatestVersion*(): VersionInfo =
|
||||||
|
|
||||||
# Read version from folder
|
# Read version from folder
|
||||||
let secureSSLContext = newContext()
|
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.version = client.getContent(url & "/VERSION").strip()
|
||||||
result.url = url
|
result.url = url
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue