Related to the above: I have one coroutine writing...
# ktor
c
Related to the above: I have one coroutine writing to the socket, and one reading. Is that allowed? The error mentions "concurrent read attempts", but I don't think I have multiple coroutines reading. The reading coroutine uses
Copy code
while (currentCoroutineContext().isActive) {
    select {
        // …

        async {
		    readChannel.awaitContent(4 * 4) // standard message header size
		}.onAwait { isActive ->
            // …
        }
    }
}
Maybe that's not the correct way to use a
ByteReadChannel
in a
select
expression?
(I found a way to refactor without using a
select
, but I'm still curious about the result)
a
Can you please share a complete code snippet?
a
Unfortunately, I cannot say what the root cause of the exception is. Can you please put a breakpoint on this line to find out those reads?