From d156fcf9c8f5b3d76afff66e5cdfe20e618d38af Mon Sep 17 00:00:00 2001 From: EvilSeph Date: Sat, 23 Apr 2011 04:47:38 -0400 Subject: [PATCH] Hid stacktrace for socket exceptions. --- src/main/java/net/minecraft/server/Packet.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main/java/net/minecraft/server/Packet.java b/src/main/java/net/minecraft/server/Packet.java index 509cb221c3..ba71f4f9eb 100644 --- a/src/main/java/net/minecraft/server/Packet.java +++ b/src/main/java/net/minecraft/server/Packet.java @@ -9,6 +9,11 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; +// CraftBukkit start +import java.net.SocketException; +import java.net.SocketTimeoutException; +// CraftBukkit end + public abstract class Packet { private static Map a = new HashMap(); @@ -84,6 +89,16 @@ public abstract class Packet { return null; } + // CraftBukkit start + catch (SocketTimeoutException exception) { + System.out.println("Read timed out"); + return null; + } catch (SocketException exception) { + System.out.println("Connection reset"); + return null; + } + // CraftBukkit end + PacketCounter packetcounter = (PacketCounter) e.get(Integer.valueOf(i)); if (packetcounter == null) {