mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 09:50:16 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
ff6403cd87
@ -126,19 +126,11 @@ internal class TIMBotNetworkHandler(private val bot: Bot) : BotNetworkHandler {
|
|||||||
if (ServerPacketReceivedEvent(bot, packet).broadcast().cancelled) {
|
if (ServerPacketReceivedEvent(bot, packet).broadcast().cancelled) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
withContext(CoroutineExceptionHandler { _, e -> e.printStackTrace() }) {
|
loginHandler.onPacketReceived(packet)
|
||||||
launch(this.coroutineContext) {
|
packetHandlers.forEach {
|
||||||
loginHandler.onPacketReceived(packet)
|
it.instance.onPacketReceived(packet)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
packetHandlers.forEach {
|
|
||||||
launch(this.coroutineContext) {
|
|
||||||
it.instance.onPacketReceived(packet)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}//awaits all coroutines launched in this block
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private var socket: DatagramSocket? = null
|
private var socket: DatagramSocket? = null
|
||||||
|
Loading…
Reference in New Issue
Block a user