Update to 5.13.1 (1828)

This commit is contained in:
DrKLO 2020-01-05 21:39:58 +03:00
parent dd07a925ee
commit 06f4895201
4 changed files with 10 additions and 7 deletions

View File

@ -283,7 +283,7 @@ android {
}
}
defaultConfig.versionCode = 1827
defaultConfig.versionCode = 1828
applicationVariants.all { variant ->
variant.outputs.all { output ->

View File

@ -377,8 +377,8 @@ void ConnectionsManager::loadConfig() {
if (version >= 5) {
int32_t lastServerTime = buffer->readInt32(nullptr);
int32_t currentTime = getCurrentTime();
if (currentTime < lastServerTime) {
timeDifference = lastServerTime - currentTime;
if (currentTime > timeDifference && currentTime < lastServerTime) {
timeDifference += (lastServerTime - currentTime);
}
}
@ -659,7 +659,11 @@ void ConnectionsManager::onConnectionClosed(Connection *connection, int reason)
if (!connection->hasUsefullData()) {
if (LOGS_ENABLED) DEBUG_D("start requesting new address and port due to timeout reach");
requestingSecondAddressByTlsHashMismatch = connection->hasTlsHashMismatch();
requestingSecondAddress = 0;
if (requestingSecondAddressByTlsHashMismatch) {
requestingSecondAddress = 1;
} else {
requestingSecondAddress = 0;
}
delegate->onRequestNewServerIpAndPort(requestingSecondAddress, instanceNum);
} else {
if (LOGS_ENABLED) DEBUG_D("connection has usefull data, don't request anything");
@ -3097,7 +3101,7 @@ void ConnectionsManager::applyDnsConfig(NativeByteBuffer *buffer, std::string ph
int currentDate = getCurrentTime();
if (config != nullptr && config->date <= currentDate && currentDate <= config->expires) {
if (realDate > 0 && requestingSecondAddressByTlsHashMismatch) {
timeDifference = realDate - currentDate;
timeDifference += (realDate - currentDate);
requestingSecondAddressByTlsHashMismatch = false;
}
for (std::vector<std::unique_ptr<TL_accessPointRule>>::iterator iter = config->rules.begin(); iter != config->rules.end(); iter++) {

View File

@ -19,7 +19,7 @@ public class BuildVars {
public static boolean USE_CLOUD_STRINGS = true;
public static boolean CHECK_UPDATES = true;
public static boolean TON_WALLET_STANDALONE = false;
public static int BUILD_VERSION = 1827;
public static int BUILD_VERSION = 1828;
public static String BUILD_VERSION_STRING = "5.13.0";
public static int APP_ID = 4;
public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103";

View File

@ -996,7 +996,6 @@ public class ConnectionsManager extends BaseController {
protected NativeByteBuffer doInBackground(Void... voids) {
ByteArrayOutputStream outbuf = null;
InputStream httpConnectionStream = null;
//curl -s "https://dns.google.com/resolve?name=apv2.stel.com&type=ANY&random_padding=askdkadaas3232dskdKFKDs"
try {
String domain = native_isTestBackend(currentAccount) != 0 ? "tapv3.stel.com" : AccountInstance.getInstance(currentAccount).getMessagesController().dcDomainName;
int len = Utilities.random.nextInt(116) + 13;