diff options
author | Nate Mortensen <nate.richard.mortensen@gmail.com> | 2014-04-15 20:45:03 -0600 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2014-04-17 13:44:03 -0500 |
commit | 7e54acc8bd267a64902fbf260422c984bc7846c0 (patch) | |
tree | 2ce4ed6f33611eee6ffc4ef76c6f861b40345881 /src/main/java/net/minecraft/server/NetworkManager.java | |
parent | 98555224aaee83601bda2906aa53f05d91926c78 (diff) | |
download | craftbukkit-7e54acc8bd267a64902fbf260422c984bc7846c0.tar craftbukkit-7e54acc8bd267a64902fbf260422c984bc7846c0.tar.gz craftbukkit-7e54acc8bd267a64902fbf260422c984bc7846c0.tar.lz craftbukkit-7e54acc8bd267a64902fbf260422c984bc7846c0.tar.xz craftbukkit-7e54acc8bd267a64902fbf260422c984bc7846c0.zip |
Update CraftBukkit to Minecraft 1.7.9
Diffstat (limited to 'src/main/java/net/minecraft/server/NetworkManager.java')
-rw-r--r-- | src/main/java/net/minecraft/server/NetworkManager.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java index 1dd22279..1b080c77 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -13,6 +13,7 @@ import net.minecraft.util.io.netty.channel.SimpleChannelInboundHandler; import net.minecraft.util.io.netty.channel.local.LocalChannel; import net.minecraft.util.io.netty.channel.local.LocalServerChannel; import net.minecraft.util.io.netty.channel.nio.NioEventLoopGroup; +import net.minecraft.util.io.netty.handler.timeout.TimeoutException; import net.minecraft.util.io.netty.util.AttributeKey; import net.minecraft.util.io.netty.util.concurrent.GenericFutureListener; import net.minecraft.util.org.apache.commons.lang3.Validate; @@ -66,7 +67,15 @@ public class NetworkManager extends SimpleChannelInboundHandler { } public void exceptionCaught(ChannelHandlerContext channelhandlercontext, Throwable throwable) { - this.close(new ChatMessage("disconnect.genericReason", new Object[] { "Internal Exception: " + throwable})); + ChatMessage chatmessage; + + if (throwable instanceof TimeoutException) { + chatmessage = new ChatMessage("disconnect.timeout", new Object[0]); + } else { + chatmessage = new ChatMessage("disconnect.genericReason", new Object[] { "Internal Exception: " + throwable}); + } + + this.close(chatmessage); } protected void a(ChannelHandlerContext channelhandlercontext, Packet packet) { |