mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-30 10:47:33 +02:00
Reduce work threads, because processing is async
This commit is contained in:
@ -18,8 +18,6 @@ import static com.comphenix.protocol.PacketType.Login.Client.START;
|
|||||||
|
|
||||||
public class ProtocolLibListener extends PacketAdapter {
|
public class ProtocolLibListener extends PacketAdapter {
|
||||||
|
|
||||||
private static final int WORKER_THREADS = 3;
|
|
||||||
|
|
||||||
private final FastLoginBukkit plugin;
|
private final FastLoginBukkit plugin;
|
||||||
|
|
||||||
//just create a new once on plugin enable. This used for verify token generation
|
//just create a new once on plugin enable. This used for verify token generation
|
||||||
@ -43,7 +41,7 @@ public class ProtocolLibListener extends PacketAdapter {
|
|||||||
ProtocolLibrary.getProtocolManager()
|
ProtocolLibrary.getProtocolManager()
|
||||||
.getAsynchronousManager()
|
.getAsynchronousManager()
|
||||||
.registerAsyncHandler(new ProtocolLibListener(plugin, rateLimiter))
|
.registerAsyncHandler(new ProtocolLibListener(plugin, rateLimiter))
|
||||||
.start(WORKER_THREADS);
|
.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user