diff --git a/src/dorkbox/network/connection/EndPoint.kt b/src/dorkbox/network/connection/EndPoint.kt index c27532d3..9b217d4c 100644 --- a/src/dorkbox/network/connection/EndPoint.kt +++ b/src/dorkbox/network/connection/EndPoint.kt @@ -711,7 +711,7 @@ internal constructor(val type: Class<*>, internal val config: Configuration) : A */ fun isRunning(): Boolean { // if the media driver is running, it will be a quick connection. Usually 100ms or so - return mediaDriverContext?.isDriverActive(1_000, logger::debug) ?: false + return mediaDriverContext.isDriverActive(1_000, logger::debug) } final override fun close() { diff --git a/src/dorkbox/network/other/coroutines/SuspendWaiter.kt b/src/dorkbox/network/other/coroutines/SuspendWaiter.kt index c16b3db9..2505e731 100644 --- a/src/dorkbox/network/other/coroutines/SuspendWaiter.kt +++ b/src/dorkbox/network/other/coroutines/SuspendWaiter.kt @@ -4,7 +4,7 @@ import kotlinx.coroutines.channels.Channel // this is bi-directional waiting. The method names to not reflect this, however there is no possibility of race conditions w.r.t. waiting // https://kotlinlang.org/docs/reference/coroutines/channels.html -class SuspendWaiter(private val channel: Channel = Channel()) { +internal data class SuspendWaiter(private val channel: Channel = Channel()) { // "receive' suspends until another coroutine invokes "send" // and // "send" suspends until another coroutine invokes "receive". diff --git a/src/dorkbox/network/rmi/RmiResponseManager.kt b/src/dorkbox/network/rmi/RmiResponseManager.kt index 27a85d64..c6032ed1 100644 --- a/src/dorkbox/network/rmi/RmiResponseManager.kt +++ b/src/dorkbox/network/rmi/RmiResponseManager.kt @@ -187,7 +187,7 @@ internal class RmiResponseManager(private val logger: KLogger, private val actio fun close() { pendingLock.write { - pending.forEachIndexed { index, any -> + pending.forEachIndexed { index, _ -> pending[index] = null } }