Waterfall/BungeeCord-Patches/0014-Enable-TCP_NODELAY.patch

23 lines
948 B
Diff
Raw Permalink Normal View History

From 8b98ff8d43ae4244bb9700d76f6d8b02270bc6fd Mon Sep 17 00:00:00 2001
From: Harry <me@harry5573.uk>
2018-05-28 22:53:01 +02:00
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 544d34ed..6a0d3351 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
@@ -195,6 +195,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 );
2017-08-18 11:36:42 +02:00
ch.config().setWriteBufferWaterMark( MARK );
--
2.44.0