https://kotlinlang.org logo
Title
r

rook

09/09/2019, 10:10 PM
E/File$object: kotlinx.coroutines.channels.ClosedSendChannelException: Channel was closed
        at kotlinx.coroutines.channels.Closed.getSendException(AbstractChannel.kt:1048)
        at kotlinx.coroutines.channels.AbstractSendChannel.offer(AbstractChannel.kt:166)
        at kotlinx.coroutines.channels.ChannelCoroutine.offer(ChannelCoroutine.kt)
I’m not quite sure what I’m doing wrong here. I get the
Channel was closed
error when I try to
offer
.
d

Dominaezzz

09/09/2019, 10:15 PM
channelFlow<List<Foo>> {
    updateStream().subscribe({ offer(it) }, {})
    awaitClose {
        // unsubscribe
    }
}
r

rook

09/09/2019, 10:16 PM
Ugh, such a RTFM moment. Thank you! @Dominaezzz