Ensure packet hooks are called sync - thanks @aadnk for pointing this out
Dieser Commit ist enthalten in:
Ursprung
cd02250065
Commit
a59da621da
@ -1,4 +1,4 @@
|
||||
From ee8dd3943261014e8444bbfb06a3aeeb3bd587e9 Mon Sep 17 00:00:00 2001
|
||||
From ebb81f5f718e2f23a77bae13b3cae39330f65e22 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 2 Jul 2013 09:06:29 +1000
|
||||
Subject: [PATCH] Netty
|
||||
@ -375,10 +375,10 @@ index 0000000..2eb1dcb
|
||||
+}
|
||||
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..7340f5a
|
||||
index 0000000..c73d70c
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/spigotmc/netty/NettyNetworkManager.java
|
||||
@@ -0,0 +1,314 @@
|
||||
@@ -0,0 +1,313 @@
|
||||
+package org.spigotmc.netty;
|
||||
+
|
||||
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||
@ -551,31 +551,31 @@ index 0000000..7340f5a
|
||||
+ // Only send if channel is still connected
|
||||
+ if ( connected )
|
||||
+ {
|
||||
+ // Process packet via handler
|
||||
+ final Packet packet0 = PacketListener.callQueued( this, connection, packet );
|
||||
+ highPriorityQueue.add( packet0 );
|
||||
+ // If handler indicates packet send
|
||||
+ if ( packet0 != null )
|
||||
+ {
|
||||
+ if ( channel.eventLoop().inEventLoop() )
|
||||
+ {
|
||||
+ queue0( packet );
|
||||
+ queue0( packet0 );
|
||||
+ } else
|
||||
+ {
|
||||
+ channel.eventLoop().execute( new Runnable()
|
||||
+ {
|
||||
+ public void run()
|
||||
+ {
|
||||
+ queue0( packet );
|
||||
+ queue0( packet0 );
|
||||
+ }
|
||||
+ } );
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private void queue0(Packet packet)
|
||||
+ {
|
||||
+ // Process packet via handler
|
||||
+ packet = PacketListener.callQueued( this, connection, packet );
|
||||
+ // If handler indicates packet send
|
||||
+ if ( packet != null )
|
||||
+ {
|
||||
+ highPriorityQueue.add( packet );
|
||||
+
|
||||
+ if ( packet instanceof Packet255KickDisconnect )
|
||||
+ {
|
||||
+ writer.lastFlush = 0;
|
||||
@ -588,7 +588,6 @@ index 0000000..7340f5a
|
||||
+ channel.pipeline().addBefore( "decoder", "encrypt", new CipherEncoder( encrypt ) );
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * wakeThreads. In Vanilla this method will interrupt the network read and
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren