mirror of
https://github.com/DrKLO/Telegram.git
synced 2025-01-03 09:49:15 +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;
|
networkAvailable = value;
|
||||||
if (!networkAvailable) {
|
if (!networkAvailable) {
|
||||||
connectionState = ConnectionStateWaitingForNetwork;
|
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) {
|
if (delegate != nullptr) {
|
||||||
delegate->onConnectionStateChanged(connectionState);
|
delegate->onConnectionStateChanged(connectionState);
|
||||||
|
|
Loading…
Reference in a new issue