Don't override the network manager list unnecessarily.
Dieser Commit ist enthalten in:
Ursprung
85d415de7c
Commit
b52ea72903
@ -45,7 +45,7 @@ public class NettyProtocolInjector implements ChannelListener {
|
|||||||
// The temporary player factory
|
// The temporary player factory
|
||||||
private TemporaryPlayerFactory playerFactory = new TemporaryPlayerFactory();
|
private TemporaryPlayerFactory playerFactory = new TemporaryPlayerFactory();
|
||||||
private List<VolatileField> bootstrapFields = Lists.newArrayList();
|
private List<VolatileField> bootstrapFields = Lists.newArrayList();
|
||||||
private BootstrapList networkManagers;
|
private List<Object> networkManagers;
|
||||||
|
|
||||||
// Different sending filters
|
// Different sending filters
|
||||||
private PacketTypeSet sendingFilters = new PacketTypeSet();
|
private PacketTypeSet sendingFilters = new PacketTypeSet();
|
||||||
@ -119,16 +119,16 @@ public class NettyProtocolInjector implements ChannelListener {
|
|||||||
|
|
||||||
for (VolatileField field : bootstrapFields) {
|
for (VolatileField field : bootstrapFields) {
|
||||||
final List<Object> list = (List<Object>) field.getValue();
|
final List<Object> list = (List<Object>) field.getValue();
|
||||||
final BootstrapList bootstrap = new BootstrapList(list, connectionHandler);
|
|
||||||
|
|
||||||
// Synchronize with each list before we attempt to replace them.
|
|
||||||
field.setValue(bootstrap);
|
|
||||||
|
|
||||||
|
// We don't have to override this list
|
||||||
if (list == networkManagerList) {
|
if (list == networkManagerList) {
|
||||||
// Save it for later
|
// Save it for later
|
||||||
networkManagers = bootstrap;
|
networkManagers = list;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Synchronize with each list before we attempt to replace them.
|
||||||
|
field.setValue(new BootstrapList(list, connectionHandler));
|
||||||
}
|
}
|
||||||
|
|
||||||
injected = true;
|
injected = true;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren