Commit ff6403cd authored by Him188's avatar Him188

Merge remote-tracking branch 'origin/master'

parents 5292b224 f7cdbbde
......@@ -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
......
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