Skip to content

Commit 64f1ada

Browse files
e5lcy6erGn0m
authored andcommitted
Fix readRemaining
1 parent 7fc9266 commit 64f1ada

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kotlinx-coroutines-io/common/src/kotlinx/coroutines/io/ByteChannelSequential.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ abstract class ByteChannelSequentialBase(initial: IoBuffer, override val autoFlu
329329
builder.writePacket(readable)
330330
afterRead()
331331

332-
if (writable.size == 0 && closed) break
332+
if (readable.remaining == 0L && writable.size == 0 && closed) break
333333

334334
awaitSuspend(1)
335335
}

0 commit comments

Comments
 (0)