diff --git a/transport-raknet/src/main/java/org/cloudburstmc/netty/channel/raknet/RakServerChannel.java b/transport-raknet/src/main/java/org/cloudburstmc/netty/channel/raknet/RakServerChannel.java index 1b40471..6f4bbae 100644 --- a/transport-raknet/src/main/java/org/cloudburstmc/netty/channel/raknet/RakServerChannel.java +++ b/transport-raknet/src/main/java/org/cloudburstmc/netty/channel/raknet/RakServerChannel.java @@ -22,6 +22,8 @@ import io.netty.channel.socket.DatagramChannel; import io.netty.util.concurrent.GenericFutureListener; import io.netty.util.concurrent.PromiseCombiner; +import io.netty.util.internal.logging.InternalLogger; +import io.netty.util.internal.logging.InternalLoggerFactory; import org.cloudburstmc.netty.channel.proxy.ProxyChannel; import org.cloudburstmc.netty.channel.raknet.config.DefaultRakServerConfig; import org.cloudburstmc.netty.channel.raknet.config.RakServerChannelConfig; @@ -42,6 +44,8 @@ public class RakServerChannel extends ProxyChannel implements ServerChannel { + private static final InternalLogger log = InternalLoggerFactory.getInstance(RakServerChannel.class); + private final RakServerChannelConfig config; private final Map childChannelMap = new ConcurrentHashMap<>(); private final Consumer childConsumer; @@ -115,6 +119,9 @@ private void onChildClosed(ChannelFuture channelFuture) { @Override public void onCloseTriggered(ChannelPromise promise) { + if (log.isTraceEnabled()) { + log.trace("Closing RakServerChannel: {}", Thread.currentThread().getName(), new Throwable()); + } PromiseCombiner combiner = new PromiseCombiner(this.eventLoop()); this.childChannelMap.values().forEach(channel -> combiner.add(channel.close()));