diff --git a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/network/protocol/tim/TIMBotNetworkHandler.kt b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/network/protocol/tim/TIMBotNetworkHandler.kt index d1afda0c8..9863bf909 100644 --- a/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/network/protocol/tim/TIMBotNetworkHandler.kt +++ b/mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/network/protocol/tim/TIMBotNetworkHandler.kt @@ -126,19 +126,11 @@ internal class TIMBotNetworkHandler(private val bot: Bot) : BotNetworkHandler { if (ServerPacketReceivedEvent(bot, packet).broadcast().cancelled) { return } - - withContext(CoroutineExceptionHandler { _, e -> e.printStackTrace() }) { - launch(this.coroutineContext) { - loginHandler.onPacketReceived(packet) - } - - - packetHandlers.forEach { - launch(this.coroutineContext) { - it.instance.onPacketReceived(packet) - } - } - }//awaits all coroutines launched in this block + + loginHandler.onPacketReceived(packet) + packetHandlers.forEach { + it.instance.onPacketReceived(packet) + } } private var socket: DatagramSocket? = null