Add a maximal timeout for version update checking
This commit is contained in:
parent
7664c3de8b
commit
7126826eeb
@ -54,7 +54,8 @@ namespace cryfs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
optional<ptree> VersionChecker::_getVersionInfo(shared_ptr<HttpClient> httpClient) {
|
optional<ptree> VersionChecker::_getVersionInfo(shared_ptr<HttpClient> httpClient) {
|
||||||
optional<string> response = httpClient->get("http://www.cryfs.org/version_info.json");
|
long timeoutMsec = 2000;
|
||||||
|
optional<string> response = httpClient->get("http://www.cryfs.org/version_info.json", timeoutMsec);
|
||||||
if (response == none) {
|
if (response == none) {
|
||||||
return none;
|
return none;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user