Ignore AsynchronousCloseException

This commit is contained in:
Him188 2020-01-10 23:14:04 +08:00
parent 80a6d1bc23
commit d7b8d8b4d2

View File

@ -121,7 +121,9 @@ internal class TIMPCBotNetworkHandler internal constructor(coroutineContext: Cor
close()
return
} catch (e: ReadPacketInternalException) {
bot.logger.error("Socket channel read failed: ${e.message}")
if (e.message != "java.nio.channels.AsynchronousCloseException") {
bot.logger.error("Socket channel read failed: ${e.message}")
}
continue
} catch (e: CancellationException) {
return