fix comment and make function private in netty network client

This commit is contained in:
Bixilon 2022-01-12 13:19:49 +01:00
parent 165b875e39
commit e5eb50ad93
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -51,8 +51,8 @@ import javax.crypto.Cipher
class NettyClient(
val connection: Connection,
) : SimpleChannelInboundHandler<Any>() {
private var errorReported = false // dont report errors in status
private val reportErrors: Boolean get() = connection is PlayConnection && !errorReported
private var errorReported = false
private val reportErrors: Boolean get() = connection is PlayConnection && !errorReported // dont report errors in status
var connected by watched(false)
private set
var state by watched(ProtocolStates.HANDSHAKING)
@ -195,7 +195,7 @@ class NettyClient(
}
}
fun requireChannel(): Channel {
private fun requireChannel(): Channel {
val channel = this.channel
if (!connected || channel == null) {
throw IllegalStateException("Not connected!")