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<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) {
|
||||
return none;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user