Skip to content

Commit 9b237c2

Browse files
committed
Additional catch
1 parent 77b25d4 commit 9b237c2

File tree

1 file changed

+3
-0
lines changed
  • firebase-app/src/commonMain/kotlin/dev/gitlive/firebase

1 file changed

+3
-0
lines changed

firebase-app/src/commonMain/kotlin/dev/gitlive/firebase/firebase.kt

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
@file:JvmName("CommonKt")
77
package dev.gitlive.firebase
88

9+
import kotlinx.coroutines.CancellationException
910
import kotlinx.coroutines.channels.ClosedSendChannelException
1011
import kotlinx.coroutines.channels.SendChannel
1112
import kotlin.jvm.JvmMultifileClass
@@ -67,4 +68,6 @@ inline fun <E> SendChannel<E>.offerOrNull(element: E): Boolean? = try {
6768
offer(element)
6869
} catch (e : ClosedSendChannelException) {
6970
null
71+
} catch (e : CancellationException) {
72+
null
7073
}

0 commit comments

Comments
 (0)