Skip to content

Commit bd5a4c8

Browse files
committed
fix update of bufferEndSegment
1 parent 439ed26 commit bd5a4c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kotlinx-coroutines-core/common/src/channels/BufferedChannel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2422,7 +2422,7 @@ internal open class BufferedChannel<E>(
24222422
val segment = it.segment
24232423
// Advance the `bufferEnd` segment if required.
24242424
if (!isRendezvousOrUnlimited && id <= bufferEndCounter / SEGMENT_SIZE) {
2425-
bufferEndSegment.moveForward(segment)
2425+
bufferEndSegment.value.let { bufferEndSegment.moveToSpecifiedOrLast(id, it) }
24262426
}
24272427
// Is the required segment removed?
24282428
if (segment.id > id) {

0 commit comments

Comments
 (0)