mirror of
https://github.com/DrKLO/Telegram.git
synced 2024-12-22 06:25:14 +01:00
Fixed restore key generation after network becomes available
This commit is contained in:
parent
6bb7547f50
commit
3d165f17ec
1 changed files with 6 additions and 0 deletions
|
@ -2400,6 +2400,12 @@ void ConnectionsManager::setNetworkAvailable(bool value) {
|
|||
networkAvailable = value;
|
||||
if (!networkAvailable) {
|
||||
connectionState = ConnectionStateWaitingForNetwork;
|
||||
} else {
|
||||
for (std::map<uint32_t, Datacenter *>::iterator iter = datacenters.begin(); iter != datacenters.end(); iter++) {
|
||||
if (iter->second->isHandshaking()) {
|
||||
iter->second->createGenericConnection()->connect();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (delegate != nullptr) {
|
||||
delegate->onConnectionStateChanged(connectionState);
|
||||
|
|
Loading…
Reference in a new issue