mirror of
https://github.com/PaperMC/Waterfall.git
synced 2024-11-16 07:15:14 +01:00
23 lines
1.0 KiB
Diff
23 lines
1.0 KiB
Diff
From bcc815e0187479c61481452bfbd63e344f9961d5 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 a70a215..5ba31a4 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
|
|
@@ -120,6 +120,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.pipeline().addLast( TIMEOUT_HANDLER, new ReadTimeoutHandler( BungeeCord.getInstance().config.getTimeout(), TimeUnit.MILLISECONDS ) );
|
|
--
|
|
2.7.4 (Apple Git-66)
|
|
|