mirror of https://github.com/procxx/kepka.git
Remove checked key property.
This commit is contained in:
parent
fe1e627cac
commit
f37ab6e38e
|
@ -1075,22 +1075,6 @@ void ConnectionPrivate::restart() {
|
|||
_waitForReceivedTimer.cancel();
|
||||
_waitForConnectedTimer.cancel();
|
||||
|
||||
auto key = _sessionData->getKey();
|
||||
if (key) {
|
||||
if (!_sessionData->isCheckedKey()) {
|
||||
// No destroying in case of an error.
|
||||
//
|
||||
//if (mayBeBadKey) {
|
||||
// clearMessages();
|
||||
// _keyId = kRecreateKeyId;
|
||||
// retryTimeout = 1; // no ddos please
|
||||
// LOG(("MTP Info: key may be bad and was not checked - but won't be destroyed, no log outs because of bad server right now..."));
|
||||
//}
|
||||
} else {
|
||||
_sessionData->setCheckedKey(false);
|
||||
}
|
||||
}
|
||||
|
||||
lockFinished.unlock();
|
||||
doDisconnect();
|
||||
|
||||
|
@ -1476,10 +1460,6 @@ void ConnectionPrivate::handleReceived() {
|
|||
}
|
||||
_retryTimeout = 1; // reset restart() timer
|
||||
|
||||
if (!_sessionData->isCheckedKey()) {
|
||||
DEBUG_LOG(("MTP Info: marked auth key as checked"));
|
||||
_sessionData->setCheckedKey(true);
|
||||
}
|
||||
_startedConnectingAt = crl::time(0);
|
||||
|
||||
if (!wasConnected) {
|
||||
|
|
|
@ -189,15 +189,6 @@ public:
|
|||
}
|
||||
void setKeyForCheck(const AuthKeyPtr &key);
|
||||
|
||||
bool isCheckedKey() const {
|
||||
QReadLocker locker(&_lock);
|
||||
return _keyChecked;
|
||||
}
|
||||
void setCheckedKey(bool checked) {
|
||||
QWriteLocker locker(&_lock);
|
||||
_keyChecked = checked;
|
||||
}
|
||||
|
||||
QReadWriteLock *keyMutex() const;
|
||||
|
||||
not_null<QReadWriteLock*> toSendMutex() const {
|
||||
|
@ -297,7 +288,6 @@ private:
|
|||
|
||||
AuthKeyPtr _authKey;
|
||||
AuthKeyPtr _dcKeyForCheck;
|
||||
bool _keyChecked = false;
|
||||
bool _layerInited = false;
|
||||
ConnectionOptions _options;
|
||||
|
||||
|
|
Loading…
Reference in New Issue