[FIX] Неправильного вывода IP командой clients. Closes #411.

This commit is contained in:
Zaxar163 2020-08-24 12:05:24 +03:00
parent d98c6c39c5
commit ea299c4fea
No known key found for this signature in database
GPG key ID: 1FE4F2E1F053831B
2 changed files with 1 additions and 3 deletions

View file

@ -5,8 +5,6 @@
import java.util.Map;
public abstract class Command extends pro.gravit.utils.command.Command {
protected final LaunchServer server;

View file

@ -29,7 +29,7 @@ public void invoke(String... args) {
service.channels.forEach((channel -> {
WebSocketFrameHandler frameHandler = channel.pipeline().get(WebSocketFrameHandler.class);
Client client = frameHandler.getClient();
String ip = IOHelper.getIP(channel.remoteAddress());
String ip = frameHandler.context.ip != null ? frameHandler.context.ip : IOHelper.getIP(channel.remoteAddress());
if (!client.isAuth)
LogHelper.info("Channel %s | connectUUID %s | checkSign %s", ip, frameHandler.getConnectUUID(), client.checkSign ? "true" : "false");
else {