Dont throttle twice

This commit is contained in:
md_5 2013-06-02 11:52:13 +10:00
parent cbd0e009ee
commit f93f827d2d

View file

@ -1,4 +1,4 @@
From c423a31e3705316ac33d4ebee8557320250cd3a6 Mon Sep 17 00:00:00 2001
From 01fdb14b4a1ff1b21f4ec0979c48473a1319e044 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Tue, 23 Apr 2013 11:47:32 +1000
Subject: [PATCH] Netty
@ -484,10 +484,10 @@ index 0000000..4ff943b
+}
diff --git a/src/main/java/org/spigotmc/netty/NettyNetworkManager.java b/src/main/java/org/spigotmc/netty/NettyNetworkManager.java
new file mode 100644
index 0000000..d6581a0
index 0000000..e63754a
--- /dev/null
+++ b/src/main/java/org/spigotmc/netty/NettyNetworkManager.java
@@ -0,0 +1,301 @@
@@ -0,0 +1,296 @@
+package org.spigotmc.netty;
+
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
@ -568,11 +568,6 @@ index 0000000..d6581a0
+ // Channel and address groundwork first
+ channel = ctx.channel();
+ address = channel.remoteAddress();
+ // Check the throttle
+ if ( serverConnection.throttle( ( (InetSocketAddress) channel.remoteAddress() ).getAddress() ) )
+ {
+ channel.close();
+ }
+ // Then the socket adaptor
+ socketAdaptor = NettySocketAdaptor.adapt( (SocketChannel) channel );
+ // Followed by their first handler