diff --git a/src/dorkbox/network/Client.kt b/src/dorkbox/network/Client.kt index 1fe24b8c..cdb683a4 100644 --- a/src/dorkbox/network/Client.kt +++ b/src/dorkbox/network/Client.kt @@ -411,7 +411,6 @@ open class Client(config: Configuration = Configuration remoteAddress!! // VALIDATE are we allowed to connect to this server (now that we have the initial server information) - @Suppress("UNCHECKED_CAST") val permitConnection = listenerManager.notifyFilter(newConnection) if (!permitConnection) { handshakeConnection.close() diff --git a/src/dorkbox/network/handshake/ServerHandshake.kt b/src/dorkbox/network/handshake/ServerHandshake.kt index e8b409a4..e55a316f 100644 --- a/src/dorkbox/network/handshake/ServerHandshake.kt +++ b/src/dorkbox/network/handshake/ServerHandshake.kt @@ -29,11 +29,7 @@ import dorkbox.network.connection.Connection import dorkbox.network.connection.ConnectionParams import dorkbox.network.connection.ListenerManager import dorkbox.network.connection.PublicKeyValidationState -import dorkbox.network.exceptions.AllocationException -import dorkbox.network.exceptions.ClientException -import dorkbox.network.exceptions.ClientRejectedException -import dorkbox.network.exceptions.ClientTimedOutException -import dorkbox.network.exceptions.ServerException +import dorkbox.network.exceptions.* import io.aeron.Aeron import io.aeron.Publication import kotlinx.coroutines.CoroutineScope @@ -293,7 +289,6 @@ internal class ServerHandshake(private val logger: KLog val connection = server.newConnection(ConnectionParams(server, clientConnection, PublicKeyValidationState.VALID)) // VALIDATE:: are we allowed to connect to this server (now that we have the initial server information) - @Suppress("UNCHECKED_CAST") val permitConnection = listenerManager.notifyFilter(connection) if (!permitConnection) { // have to unwind actions! @@ -476,7 +471,6 @@ internal class ServerHandshake(private val logger: KLog val connection = server.newConnection(ConnectionParams(server, clientConnection, validateRemoteAddress)) // VALIDATE:: are we allowed to connect to this server (now that we have the initial server information) - @Suppress("UNCHECKED_CAST") val permitConnection = listenerManager.notifyFilter(connection) if (!permitConnection) { // have to unwind actions!