mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
[FIX] NPE в clients
This commit is contained in:
parent
5bbe63f78c
commit
92e2a6c86d
1 changed files with 4 additions and 0 deletions
|
@ -30,6 +30,10 @@ public void invoke(String... args) {
|
|||
WebSocketService service = server.nettyServerSocketHandler.nettyServer.service;
|
||||
service.channels.forEach((channel -> {
|
||||
WebSocketFrameHandler frameHandler = channel.pipeline().get(WebSocketFrameHandler.class);
|
||||
if(frameHandler == null) {
|
||||
LogHelper.info("Channel %s", IOHelper.getIP(channel.remoteAddress()));
|
||||
return;
|
||||
}
|
||||
Client client = frameHandler.getClient();
|
||||
String ip = frameHandler.context.ip != null ? frameHandler.context.ip : IOHelper.getIP(channel.remoteAddress());
|
||||
if (!client.isAuth)
|
||||
|
|
Loading…
Reference in a new issue