Commit f4f7e5f6 authored by Him188's avatar Him188

Rename an internal ambiguous function

parent bd1e5e09
...@@ -239,7 +239,7 @@ internal class TIMBotNetworkHandler internal constructor(coroutineContext: Corou ...@@ -239,7 +239,7 @@ internal class TIMBotNetworkHandler internal constructor(coroutineContext: Corou
temporaryPacketHandlers.filter { it.filter(session, packet, sequenceId) } temporaryPacketHandlers.filter { it.filter(session, packet, sequenceId) }
.also { temporaryPacketHandlers.removeAll(it) } .also { temporaryPacketHandlers.removeAll(it) }
}.forEach { }.forEach {
it.doReceiveWithoutExceptions(packet) it.doReceiveCatchingExceptions(packet)
} }
if (factory is SessionPacketFactory<*>) { if (factory is SessionPacketFactory<*>) {
......
...@@ -60,7 +60,7 @@ internal class TemporaryPacketHandler<P : Packet, R>( ...@@ -60,7 +60,7 @@ internal class TemporaryPacketHandler<P : Packet, R>(
internal inline fun filter(session: BotSession, packet: Packet, sequenceId: UShort): Boolean = internal inline fun filter(session: BotSession, packet: Packet, sequenceId: UShort): Boolean =
expectationClass.isInstance(packet) && session === this.fromSession && if (checkSequence) sequenceId == toSend.sequenceId else true expectationClass.isInstance(packet) && session === this.fromSession && if (checkSequence) sequenceId == toSend.sequenceId else true
internal suspend inline fun doReceiveWithoutExceptions(packet: Packet) { internal suspend inline fun doReceiveCatchingExceptions(packet: Packet) {
@Suppress("UNCHECKED_CAST") @Suppress("UNCHECKED_CAST")
val ret = try { val ret = try {
withContext(callerContext) { withContext(callerContext) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment