From 55198b77c4814abb74c08c894c75d364061fc608 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Fri, 1 May 2020 14:37:33 +0200 Subject: [PATCH] fixes something, i guess --- .../gearth/protocol/connection/proxy/ProxyProvider.java | 8 +++++++- .../protocol/packethandler/IncomingPacketHandler.java | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/G-Earth/src/main/java/gearth/protocol/connection/proxy/ProxyProvider.java b/G-Earth/src/main/java/gearth/protocol/connection/proxy/ProxyProvider.java index a486cc4..13eefc0 100644 --- a/G-Earth/src/main/java/gearth/protocol/connection/proxy/ProxyProvider.java +++ b/G-Earth/src/main/java/gearth/protocol/connection/proxy/ProxyProvider.java @@ -36,6 +36,9 @@ public abstract class ProxyProvider { server.setTcpNoDelay(true); client.setTcpNoDelay(true); + client.setSoTimeout(0); + server.setSoTimeout(0); + if (HConnection.DEBUG) System.out.println(server.getLocalAddress().getHostAddress() + ": " + server.getLocalPort()); Rc4Obtainer rc4Obtainer = new Rc4Obtainer(hConnection); @@ -83,7 +86,10 @@ public abstract class ProxyProvider { packetHandler.act(Arrays.copyOf(buffer, readLength)); } } - catch (IOException ignore) {} finally { + catch (IOException ignore) { +// System.err.println(packetHandler instanceof IncomingPacketHandler ? "incoming" : "outgoing"); +// ignore.printStackTrace(); + } finally { abort.release(); } }).start(); 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 c8ef55f..276bdef 100644 --- a/G-Earth/src/main/java/gearth/protocol/packethandler/IncomingPacketHandler.java +++ b/G-Earth/src/main/java/gearth/protocol/packethandler/IncomingPacketHandler.java @@ -34,6 +34,7 @@ public class IncomingPacketHandler extends PacketHandler { @Override public void act(byte[] buffer) throws IOException { + System.out.println("gotincoming"); if (isDataStream) { continuedAct(buffer); }