Add volatile to be sure the JVM wont cache the value

This commit is contained in:
md_5 2013-02-10 15:12:35 +11:00
parent 4b4eea9e4b
commit cb11c55f81
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
From 2157375faa240c2018b84e0d3f421fe9c9c10917 Mon Sep 17 00:00:00 2001
From 16294b7515b83c209c7160e9966fce2fa8dc84e0 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 3 Feb 2013 10:24:33 +1100
Subject: [PATCH] Netty
@ -199,7 +199,7 @@ index 0000000..cfc0535
+}
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..3801c0e
index 0000000..46493ef
--- /dev/null
+++ b/src/main/java/org/spigotmc/netty/NettyNetworkManager.java
@@ -0,0 +1,224 @@
@ -240,7 +240,7 @@ index 0000000..3801c0e
+ private static final NettyServerConnection serverConnection = (NettyServerConnection) server.ae();
+ /*========================================================================*/
+ static final int LEGACY_PING_TIME = 1000;
+ Packet254GetInfo pingRequest;
+ volatile Packet254GetInfo pingRequest;
+ long lastPingRead;
+ /*========================================================================*/
+ private Queue<Packet> syncPackets = new ConcurrentLinkedQueue<Packet>();