Merge pull request #44 from snepsnepsnep/master

remove key if auth is unsuccessful
This commit is contained in:
Simon Abed El Sater 2022-09-05 02:40:50 +03:00 committed by GitHub
commit 4207d7adcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,7 +94,8 @@ void CheckLocalKey(){
d.Parse(Buffer.c_str()); d.Parse(Buffer.c_str());
if (Buffer == "-1" || Buffer.at(0) != '{' || d.HasParseError()) { if (Buffer == "-1" || Buffer.at(0) != '{' || d.HasParseError()) {
error(Buffer); error(Buffer);
fatal("Invalid answer from authentication servers, please try again later!"); info("Invalid answer from authentication servers.");
UpdateKey(nullptr);
} }
if(d["success"].GetBool()){ if(d["success"].GetBool()){
LoginAuth = true; LoginAuth = true;