diff options
author | EvilSeph <evilseph@unaligned.org> | 2011-04-23 04:47:38 -0400 |
---|---|---|
committer | EvilSeph <evilseph@unaligned.org> | 2011-04-23 04:47:38 -0400 |
commit | d156fcf9c8f5b3d76afff66e5cdfe20e618d38af (patch) | |
tree | bbfd97906123ea0074c9d5e178ea49aaf09c69ff /src/main/java/net/minecraft/server/Packet.java | |
parent | 5dfe732f1854a7ff83d96c06b7fa4b6305378daf (diff) | |
download | craftbukkit-d156fcf9c8f5b3d76afff66e5cdfe20e618d38af.tar craftbukkit-d156fcf9c8f5b3d76afff66e5cdfe20e618d38af.tar.gz craftbukkit-d156fcf9c8f5b3d76afff66e5cdfe20e618d38af.tar.lz craftbukkit-d156fcf9c8f5b3d76afff66e5cdfe20e618d38af.tar.xz craftbukkit-d156fcf9c8f5b3d76afff66e5cdfe20e618d38af.zip |
Hid stacktrace for socket exceptions.
Diffstat (limited to 'src/main/java/net/minecraft/server/Packet.java')
-rw-r--r-- | src/main/java/net/minecraft/server/Packet.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/Packet.java b/src/main/java/net/minecraft/server/Packet.java index 509cb221..ba71f4f9 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) { |