mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-10 22:36:24 +00:00
fix(@desktop/updates): using timeout when checking for new version
This commit is contained in:
parent
4bef4533b6
commit
3902ddf002
@ -6,4 +6,5 @@ export KEYSTOREDIR
|
||||
export TMPDIR
|
||||
export LOGDIR
|
||||
|
||||
const APP_UPDATES_ENS* = "desktop.status.eth"
|
||||
const APP_UPDATES_ENS* = "desktop.status.eth"
|
||||
const CHECK_VERSION_TIMEOUT_MS* = 5000
|
||||
|
@ -34,8 +34,8 @@ proc getLatestVersion*(): VersionInfo =
|
||||
|
||||
# Read version from folder
|
||||
let secureSSLContext = newContext()
|
||||
let client = newHttpClient(sslContext = secureSSLContext)
|
||||
result.version = client.getContent(url & "/VERSION" ).strip()
|
||||
let client = newHttpClient(sslContext = secureSSLContext, timeout = CHECK_VERSION_TIMEOUT_MS)
|
||||
result.version = client.getContent(url & "/VERSION").strip()
|
||||
result.url = url
|
||||
|
||||
proc isNewer*(currentVersion, versionToCheck: string): bool =
|
||||
|
Loading…
x
Reference in New Issue
Block a user