From d24578fe6bc2c585a0b1a5b40b3ca80a719f7ef9 Mon Sep 17 00:00:00 2001 From: DrKLO Date: Wed, 16 Jul 2014 13:36:07 +0400 Subject: [PATCH] Bug fixes --- .../java/org/telegram/messenger/ConnectionsManager.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/ConnectionsManager.java b/TMessagesProj/src/main/java/org/telegram/messenger/ConnectionsManager.java index 19bd2c1b2..ce85bd5a2 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/ConnectionsManager.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/ConnectionsManager.java @@ -1185,6 +1185,8 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection. requestStartTime = updatingDcStartTime; updatingDcStartTime = currentTime; timeout = 60; + } else { + request.runningStartTime = 0; } if (requestStartTime != 0 && requestStartTime < currentTime - timeout) { ArrayList allDc = new ArrayList(datacenters.values()); @@ -1196,7 +1198,12 @@ public class ConnectionsManager implements Action.ActionDelegate, TcpConnection. } } 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; + } } }