mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2024-11-24 12:25:39 +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,7 +14,10 @@ interface MinecraftConnectionState {
|
||||
)
|
||||
|
||||
fun disconnect(handler: MinecraftHandler, msg: String) {
|
||||
mcLogger.info("DC ${handler.remoteAddress}: $msg")
|
||||
if (!handler.msgDisconnected) {
|
||||
handler.msgDisconnected = true
|
||||
mcLogger.info("DC ${handler.remoteAddress}: $msg")
|
||||
}
|
||||
}
|
||||
|
||||
fun onInactivated(handler: MinecraftHandler) {
|
||||
|
Loading…
Reference in New Issue
Block a user