From 4d294460782f1b18bdd681b873a2e79c12faef5f Mon Sep 17 00:00:00 2001 From: ayanamist Date: Mon, 28 Nov 2022 12:09:07 +0800 Subject: [PATCH] Fix ipv6 connection hangs when in v4 environment --- TMessagesProj/jni/tgnet/Connection.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/TMessagesProj/jni/tgnet/Connection.cpp b/TMessagesProj/jni/tgnet/Connection.cpp index fa53030ed..c325acde9 100644 --- a/TMessagesProj/jni/tgnet/Connection.cpp +++ b/TMessagesProj/jni/tgnet/Connection.cpp @@ -305,9 +305,7 @@ void Connection::connect() { ipv6 = value % 3 == 0 ? TcpAddressFlagIpv6 : 0; ConnectionsManager::getInstance(currentDatacenter->instanceNum).lastProtocolIsIpv6 = ipv6 != 0; } - if (connectionType == ConnectionTypeGeneric) { - ConnectionsManager::getInstance(currentDatacenter->instanceNum).lastProtocolUsefullData = false; - } + ConnectionsManager::getInstance(currentDatacenter->instanceNum).lastProtocolUsefullData = false; } else { ipv6 = 0; }