Add a maximal timeout for version update checking

This commit is contained in:
Sebastian Messmer 2015-11-24 08:24:37 +01:00
parent 7664c3de8b
commit 7126826eeb

View File

@ -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;
}