Fixed restore key generation after network becomes available

This commit is contained in:
DrKLO 2015-09-25 17:37:43 +03:00
parent 6bb7547f50
commit 3d165f17ec

View file

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