mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2024-11-28 13:05:16 +01:00
hide multiple exceptions under carpet
This commit is contained in:
parent
7971d3c8e4
commit
4de94027d1
@ -15,6 +15,7 @@ class MinecraftHandler(
|
||||
) : SimpleChannelInboundHandler<Packet>() {
|
||||
lateinit var remoteAddress: SocketAddress
|
||||
val other: Channel? get() = if (frontEnd) data.backChannel else data.frontChannel
|
||||
var msgDisconnected = false
|
||||
|
||||
override fun channelRead0(ctx: ChannelHandlerContext, packet: Packet) {
|
||||
if (ctx.channel().isActive) {
|
||||
|
@ -14,8 +14,11 @@ interface MinecraftConnectionState {
|
||||
)
|
||||
|
||||
fun disconnect(handler: MinecraftHandler, msg: String) {
|
||||
if (!handler.msgDisconnected) {
|
||||
handler.msgDisconnected = true
|
||||
mcLogger.info("DC ${handler.remoteAddress}: $msg")
|
||||
}
|
||||
}
|
||||
|
||||
fun onInactivated(handler: MinecraftHandler) {
|
||||
mcLogger.info("- ${handler.remoteAddress}")
|
||||
|
Loading…
Reference in New Issue
Block a user