Archiviert
13
0

These fields will be updated and read from different threads.

Mark them as volatile just in case.
Dieser Commit ist enthalten in:
Kristian S. Stangeland 2013-09-30 19:27:22 +02:00
Ursprung 75f6cff5a5
Commit b53908ef0f

Datei anzeigen

@ -98,7 +98,7 @@ public abstract class PlayerInjector implements SocketInjector {
protected static Method queueMethod; protected static Method queueMethod;
protected static Method processMethod; protected static Method processMethod;
protected Player player; protected volatile Player player;
protected boolean hasInitialized; protected boolean hasInitialized;
// Reference to the player's network manager // Reference to the player's network manager
@ -136,7 +136,7 @@ public abstract class PlayerInjector implements SocketInjector {
// Whether or not to update the current player on the first Packet1Login // Whether or not to update the current player on the first Packet1Login
boolean updateOnLogin; boolean updateOnLogin;
Player updatedPlayer; volatile Player updatedPlayer;
public PlayerInjector(ClassLoader classLoader, ErrorReporter reporter, Player player, ListenerInvoker invoker) throws IllegalAccessException { public PlayerInjector(ClassLoader classLoader, ErrorReporter reporter, Player player, ListenerInvoker invoker) throws IllegalAccessException {
this.classLoader = classLoader; this.classLoader = classLoader;