From 499c680b587583aeb6701c1e33a0c03d7d3e8bb0 Mon Sep 17 00:00:00 2001 From: Prototik Date: Mon, 29 Jun 2015 20:47:12 +0700 Subject: [PATCH] Make network connections keepalive (close #11) --- patches/net/minecraft/network/NetworkManager.java.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/patches/net/minecraft/network/NetworkManager.java.patch b/patches/net/minecraft/network/NetworkManager.java.patch index da3f586..98f6fce 100644 --- a/patches/net/minecraft/network/NetworkManager.java.patch +++ b/patches/net/minecraft/network/NetworkManager.java.patch @@ -86,6 +86,15 @@ if (this.channel.isOpen()) { this.channel.close(); +@@ -254,7 +288,7 @@ + { + ; + } +- ++ try { p_initChannel_1_.config().setOption(ChannelOption.SO_KEEPALIVE, true); } catch (ChannelException ignored) {} + try + { + p_initChannel_1_.config().setOption(ChannelOption.TCP_NODELAY, Boolean.valueOf(false)); @@ -322,6 +356,13 @@ return channel; }