From 530d1651a8dced1007b4c772b51e6becd561cba9 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Wed, 6 May 2020 01:33:41 +0200 Subject: [PATCH] make it work for weirder retros --- .../protocol/packethandler/IncomingPacketHandler.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/G-Earth/src/main/java/gearth/protocol/packethandler/IncomingPacketHandler.java b/G-Earth/src/main/java/gearth/protocol/packethandler/IncomingPacketHandler.java index 6e7ee56..2d46203 100644 --- a/G-Earth/src/main/java/gearth/protocol/packethandler/IncomingPacketHandler.java +++ b/G-Earth/src/main/java/gearth/protocol/packethandler/IncomingPacketHandler.java @@ -24,7 +24,11 @@ public class IncomingPacketHandler extends PacketHandler { isEncryptedStream = packet.readBoolean(); outgoingHandler.isEncryptedStream = true; } - else if (message.getIndex() > 3) { + else if (isDataStream && message.getPacket().structureEquals("s") && message.getPacket().length() > 200) { + ((Observable)trafficObservables[0]).removeListener(this); + outgoingHandler.isEncryptedStream = true; + } + else if (message.getIndex() > 1) { ((Observable)trafficObservables[0]).removeListener(this); } }