Skip to content

Commit ce9c51f

Browse files
committed
fix test UNLIMITED
1 parent 2f641df commit ce9c51f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

channel-event-bus/src/commonMain/kotlin/com/hoc081098/channeleventbus/ChannelEventBus.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
1313
import kotlinx.coroutines.InternalCoroutinesApi
1414
import kotlinx.coroutines.channels.Channel
1515
import kotlinx.coroutines.channels.getOrElse
16+
import kotlinx.coroutines.channels.onSuccess
1617
import kotlinx.coroutines.flow.Flow
1718
import kotlinx.coroutines.flow.emitAll
1819
import kotlinx.coroutines.flow.flow
@@ -235,8 +236,8 @@ private class ChannelEventBusImpl(
235236
}
236237
.channel
237238
.trySend(event)
239+
.onSuccess { logger?.onSent(event, this) }
238240
.getOrElse { throw ChannelEventBusException.SendException.FailedToSendEvent(event, it) }
239-
.also { logger?.onSent(event, this) }
240241
}
241242

242243
override fun <T : ChannelEvent<T>> receiveAsFlow(key: ChannelEventKey<T>): Flow<T> = flow {

0 commit comments

Comments
 (0)