mirror of
https://github.com/DrKLO/Telegram.git
synced 2024-12-22 14:35:03 +01:00
Bug fixes
This commit is contained in:
parent
5bed3fb6cd
commit
d24578fe6b
1 changed files with 8 additions and 1 deletions
|
@ -1185,6 +1185,8 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
|
||||||
requestStartTime = updatingDcStartTime;
|
requestStartTime = updatingDcStartTime;
|
||||||
updatingDcStartTime = currentTime;
|
updatingDcStartTime = currentTime;
|
||||||
timeout = 60;
|
timeout = 60;
|
||||||
|
} else {
|
||||||
|
request.runningStartTime = 0;
|
||||||
}
|
}
|
||||||
if (requestStartTime != 0 && requestStartTime < currentTime - timeout) {
|
if (requestStartTime != 0 && requestStartTime < currentTime - timeout) {
|
||||||
ArrayList<Datacenter> allDc = new ArrayList<Datacenter>(datacenters.values());
|
ArrayList<Datacenter> allDc = new ArrayList<Datacenter>(datacenters.values());
|
||||||
|
@ -1196,7 +1198,12 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Datacenter newDc = allDc.get(Math.abs(Utilities.random.nextInt() % allDc.size()));
|
Datacenter newDc = allDc.get(Math.abs(Utilities.random.nextInt() % allDc.size()));
|
||||||
datacenterId = request.runningDatacenterId = newDc.datacenterId;
|
datacenterId = newDc.datacenterId;
|
||||||
|
if (!(request.rawRequest instanceof TLRPC.TL_help_getConfig)) {
|
||||||
|
currentDatacenterId = datacenterId;
|
||||||
|
} else {
|
||||||
|
request.runningDatacenterId = datacenterId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue