Fix double lock in ServerConnection

This commit is contained in:
Alfie Cleveland 2016-11-26 22:06:23 -06:00
parent 1881616f15
commit 048e964b41

View File

@ -17,10 +17,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ private final List<NetworkManager> pending = Collections.synchronizedList(Lists.<NetworkManager>newArrayList());
+ private void addPending() {
+ synchronized (pending) {
+ synchronized (this.h) { // Paper - OBFHELPER - List of network managers
+ this.h.addAll(pending);
+ pending.clear();
+ }
+ this.h.addAll(pending); // Paper - OBFHELPER - List of network managers
+ pending.clear();
+ }
+ }
+ // Paper end