File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
channel-event-bus/src/commonMain/kotlin/com/hoc081098/channeleventbus Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
13
13
import kotlinx.coroutines.InternalCoroutinesApi
14
14
import kotlinx.coroutines.channels.Channel
15
15
import kotlinx.coroutines.channels.getOrElse
16
+ import kotlinx.coroutines.channels.onSuccess
16
17
import kotlinx.coroutines.flow.Flow
17
18
import kotlinx.coroutines.flow.emitAll
18
19
import kotlinx.coroutines.flow.flow
@@ -235,8 +236,8 @@ private class ChannelEventBusImpl(
235
236
}
236
237
.channel
237
238
.trySend(event)
239
+ .onSuccess { logger?.onSent(event, this ) }
238
240
.getOrElse { throw ChannelEventBusException .SendException .FailedToSendEvent (event, it) }
239
- .also { logger?.onSent(event, this ) }
240
241
}
241
242
242
243
override fun <T : ChannelEvent <T >> receiveAsFlow (key : ChannelEventKey <T >): Flow <T > = flow {
You can’t perform that action at this time.
0 commit comments