mirror of
https://github.com/DrKLO/Telegram.git
synced 2024-12-22 06:25:14 +01:00
Fixed datacenter port switch condition
This commit is contained in:
parent
507d05aaf1
commit
ff85d74b85
1 changed files with 2 additions and 2 deletions
|
@ -423,7 +423,7 @@ public class TcpConnection extends PyroClientAdapter {
|
|||
} else {
|
||||
FileLog.d("tmessages", "Disconnected " + TcpConnection.this);
|
||||
}
|
||||
boolean swirchToNextPort = wasConnected && hasSomeDataSinceLastConnect;
|
||||
boolean switchToNextPort = wasConnected && !hasSomeDataSinceLastConnect && timedout;
|
||||
firstPacket = true;
|
||||
restOfTheData = null;
|
||||
channelToken = 0;
|
||||
|
@ -452,7 +452,7 @@ public class TcpConnection extends PyroClientAdapter {
|
|||
}
|
||||
if (ConnectionsManager.isNetworkOnline()) {
|
||||
isNextPort = true;
|
||||
if (failedConnectionCount > willRetryConnectCount || swirchToNextPort) {
|
||||
if (failedConnectionCount > willRetryConnectCount || switchToNextPort) {
|
||||
Datacenter datacenter = ConnectionsManager.Instance.datacenterWithId(datacenterId);
|
||||
datacenter.nextAddressOrPort();
|
||||
failedConnectionCount = 0;
|
||||
|
|
Loading…
Reference in a new issue