Waterfall/BungeeCord-Patches/0014-Don-t-allow-channel-buffers-to-grow-beyond-a-reasona.patch
Techcable 3809083007
Turn waterfall into a patch-based fork like Spigot and Paper (WIP)
Allows us to easily see and manage the diff with upstream.
Makes fixing conflicts with upstream easier and shows a cleaner, more acurate commit history.

All credits to scripts go to @md_5 @aikar @Zbob750 @Thinkofname @Byteflux @Techcable (GPL3 Licensed)
2016-05-30 14:51:51 -06:00

23 lines
1.1 KiB
Diff

From 7937df226bd632a263f9db241fac040845cb916c Mon Sep 17 00:00:00 2001
From: Iceee <andrew@optic.tv>
Date: Mon, 6 Jul 2015 18:59:29 -0500
Subject: [PATCH] Don't allow channel buffers to grow beyond a reasonable limit
diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
index 3cef2cf..fd8d9b0 100644
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
@@ -310,6 +310,8 @@ public class BungeeCord extends ProxyServer
new ServerBootstrap()
.channel( PipelineUtils.getServerChannel() )
.option( ChannelOption.SO_REUSEADDR, true ) // TODO: Move this elsewhere!
+ .childOption( ChannelOption.WRITE_BUFFER_HIGH_WATER_MARK, 1024 * 1024 * 10 )
+ .childOption( ChannelOption.WRITE_BUFFER_LOW_WATER_MARK, 1024 * 1024 * 1 )
.childAttr( PipelineUtils.LISTENER, info )
.childHandler( PipelineUtils.SERVER_CHILD )
.group( eventLoops )
--
2.8.3