We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77b25d4 commit 9b237c2Copy full SHA for 9b237c2
firebase-app/src/commonMain/kotlin/dev/gitlive/firebase/firebase.kt
@@ -6,6 +6,7 @@
6
@file:JvmName("CommonKt")
7
package dev.gitlive.firebase
8
9
+import kotlinx.coroutines.CancellationException
10
import kotlinx.coroutines.channels.ClosedSendChannelException
11
import kotlinx.coroutines.channels.SendChannel
12
import kotlin.jvm.JvmMultifileClass
@@ -67,4 +68,6 @@ inline fun <E> SendChannel<E>.offerOrNull(element: E): Boolean? = try {
67
68
offer(element)
69
} catch (e : ClosedSendChannelException) {
70
null
71
+} catch (e : CancellationException) {
72
+ null
73
}
0 commit comments