Commit 3d165f17 authored by DrKLO's avatar DrKLO

Fixed restore key generation after network becomes available

parent 6bb7547f
...@@ -2400,6 +2400,12 @@ void ConnectionsManager::setNetworkAvailable(bool value) { ...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment