mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-23 19:16:14 +01:00
Make getRandomKey() properly random (#1834)
This commit is contained in:
parent
20e73369fa
commit
2092b8f48e
@ -11,6 +11,7 @@ import java.util.Map.Entry;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Set;
|
||||
import java.util.WeakHashMap;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@ -170,7 +171,7 @@ public class NettyChannelInjector implements Injector {
|
||||
}
|
||||
|
||||
private static String getRandomKey() {
|
||||
return Long.toString(System.nanoTime());
|
||||
return "ProtocolLib-" + ThreadLocalRandom.current().nextLong();
|
||||
}
|
||||
|
||||
private static boolean hasProtocolLibHandler(Channel channel) {
|
||||
|
Loading…
Reference in New Issue
Block a user