mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-18 20:05:02 -04:00
fix comment and make function private in netty network client
This commit is contained in:
parent
165b875e39
commit
e5eb50ad93
@ -51,8 +51,8 @@ import javax.crypto.Cipher
|
|||||||
class NettyClient(
|
class NettyClient(
|
||||||
val connection: Connection,
|
val connection: Connection,
|
||||||
) : SimpleChannelInboundHandler<Any>() {
|
) : SimpleChannelInboundHandler<Any>() {
|
||||||
private var errorReported = false // dont report errors in status
|
private var errorReported = false
|
||||||
private val reportErrors: Boolean get() = connection is PlayConnection && !errorReported
|
private val reportErrors: Boolean get() = connection is PlayConnection && !errorReported // dont report errors in status
|
||||||
var connected by watched(false)
|
var connected by watched(false)
|
||||||
private set
|
private set
|
||||||
var state by watched(ProtocolStates.HANDSHAKING)
|
var state by watched(ProtocolStates.HANDSHAKING)
|
||||||
@ -195,7 +195,7 @@ class NettyClient(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun requireChannel(): Channel {
|
private fun requireChannel(): Channel {
|
||||||
val channel = this.channel
|
val channel = this.channel
|
||||||
if (!connected || channel == null) {
|
if (!connected || channel == null) {
|
||||||
throw IllegalStateException("Not connected!")
|
throw IllegalStateException("Not connected!")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user