Waterfall/BungeeCord-Patches/0016-Enable-TCP_NODELAY.patch
Shane Freeder 1c8ea44393
move up Fixup ProtocolConstants to waterfall
This patch contains a trivial formatting fix, while while somewhat
pointless, I decided to keep, the main advantage is in the util
helpers which will aim to keep code cleaner (I've wished for this
to be included in waterfall for a while, and given future work, I
feel now is a good time to shift it over)
2018-10-27 22:18:13 +01:00

23 lines
948 B
Diff

From 23959a2a008f6f3bf3aed289016debdecfd293be Mon Sep 17 00:00:00 2001
From: Harry <me@harry5573.uk>
Date: Sun, 24 Jan 2016 15:13:29 -0700
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 09486b4a..41330ec2 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
@@ -134,6 +134,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.19.1