Skip to content

Commit 6eed6a9

Browse files
committed
Fix BroadcastChannel
Signed-off-by: Nikita Koval <[email protected]>
1 parent 7f1c931 commit 6eed6a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ internal class BroadcastChannelImpl<E>(
294294
// an unrelated exception, such as `OutOfMemoryError` has been thrown.
295295
// This implementation checks that the channel is actually closed,
296296
// re-throwing the caught exception otherwise.
297-
if (isClosedForSend) false
297+
if (isClosedForSend && (t is ClosedSendChannelException || sendException === t)) false
298298
else throw t
299299
}
300300
// Mark this `onSend` clause as selected and

0 commit comments

Comments
 (0)