mirror of
https://github.com/System-End/Discord-MC-Chat.git
synced 2026-04-19 23:22:49 +00:00
logger
This commit is contained in:
parent
e17943ed45
commit
ff275da25e
2 changed files with 2 additions and 2 deletions
|
|
@ -52,7 +52,7 @@ public class NettyClient {
|
|||
.channel(NioSocketChannel.class)
|
||||
.handler(new ClientChannelInitializer(this));
|
||||
|
||||
LOGGER.info("Attempting to connect to server at " + host + ":" + port);
|
||||
LOGGER.info("Attempting to connect to server at {}:{}", host, port);
|
||||
ChannelFuture future = b.connect(host, port);
|
||||
|
||||
future.addListener((ChannelFutureListener) f -> {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class ServerBusinessHandler extends SimpleChannelInboundHandler<Packet> {
|
|||
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) {
|
||||
if (evt instanceof IdleStateEvent e) {
|
||||
if (e.state() == IdleState.READER_IDLE) {
|
||||
LOGGER.warn("Did not receive heartbeat from client " + ctx.channel().remoteAddress() + ". Closing connection.");
|
||||
LOGGER.warn("Did not receive heartbeat from client {}. Closing connection.", ctx.channel().remoteAddress());
|
||||
ctx.close();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue