Add debug logging
This commit is contained in:
@@ -19,6 +19,7 @@ import kotlinx.coroutines.channels.consumeEach
|
|||||||
import kotlinx.coroutines.channels.produce
|
import kotlinx.coroutines.channels.produce
|
||||||
import kotlinx.coroutines.sync.Mutex
|
import kotlinx.coroutines.sync.Mutex
|
||||||
import kotlinx.coroutines.sync.withLock
|
import kotlinx.coroutines.sync.withLock
|
||||||
|
import timber.log.Timber
|
||||||
import java.io.*
|
import java.io.*
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import java.util.concurrent.CountDownLatch
|
import java.util.concurrent.CountDownLatch
|
||||||
@@ -194,7 +195,9 @@ class RootServer @JvmOverloads constructor(private val warnLogger: (String) -> U
|
|||||||
val result = input.readByte()
|
val result = input.readByte()
|
||||||
val callback = mutex.synchronized {
|
val callback = mutex.synchronized {
|
||||||
callbackLookup[index]!!.also {
|
callbackLookup[index]!!.also {
|
||||||
if (it.shouldRemove(result)) {
|
if (it.shouldRemove(result).also { shouldRemove ->
|
||||||
|
Timber.i("$index($result) should remove $it: $shouldRemove")
|
||||||
|
}) {
|
||||||
callbackLookup.remove(index)
|
callbackLookup.remove(index)
|
||||||
it.active = false
|
it.active = false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user