Waterfall/BungeeCord-Patches/0016-Enable-TCP_NODELAY.patch
kashike 178e989894 Merge upstream
Resolves #170
2017-08-18 02:40:00 -07:00

23 lines
948 B
Diff

From 19a82b71af00438f105225ef33ba602c03980c37 Mon Sep 17 00:00:00 2001
From: Harry <me@harry5573.uk>
Date: Wed, 24 Feb 2016 17:16:23 +0000
Subject: [PATCH] Enable TCP_NODELAY.
This is enabled by default on CraftBukkit/Spigot >= 1.8 and may help with network performance.
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
index 9d6a1013..5eeab8b5 100644
--- a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
+++ b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
@@ -133,6 +133,7 @@ public class PipelineUtils
{
// IP_TOS is not supported (Windows XP / Windows Server 2003)
}
+ ch.config().setOption( ChannelOption.TCP_NODELAY, true );
ch.config().setAllocator( PooledByteBufAllocator.DEFAULT );
ch.config().setWriteBufferWaterMark( MARK );
--
2.14.1