mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-12 17:07:55 -04:00
netty client: log closed address
This commit is contained in:
parent
b028e8f913
commit
5af4c70ae5
@ -50,6 +50,7 @@ import javax.crypto.Cipher
|
||||
class NettyClient(
|
||||
val connection: Connection,
|
||||
) : SimpleChannelInboundHandler<Any>(), ClientNetwork {
|
||||
private var address: ServerAddress? = null
|
||||
override var connected by observed(false)
|
||||
private set
|
||||
override var state by observed(ProtocolStates.HANDSHAKE)
|
||||
@ -92,6 +93,7 @@ class NettyClient(
|
||||
}
|
||||
|
||||
override fun connect(address: ServerAddress, native: Boolean) {
|
||||
this.address = address
|
||||
state = ProtocolStates.HANDSHAKE
|
||||
val natives = if (native) TransportNatives.get() else NioNatives
|
||||
val bootstrap = Bootstrap()
|
||||
@ -162,7 +164,7 @@ class NettyClient(
|
||||
}
|
||||
|
||||
override fun channelInactive(context: ChannelHandlerContext) {
|
||||
Log.log(LogMessageType.NETWORK, LogLevels.VERBOSE) { "Connection closed" }
|
||||
Log.log(LogMessageType.NETWORK, LogLevels.VERBOSE) { "Connection closed ($address)" }
|
||||
connected = false
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user