diff --git a/mirai-core/src/commonMain/kotlin/network/QQAndroidBotNetworkHandler.kt b/mirai-core/src/commonMain/kotlin/network/QQAndroidBotNetworkHandler.kt index 0d91a9164..e51784c9b 100644 --- a/mirai-core/src/commonMain/kotlin/network/QQAndroidBotNetworkHandler.kt +++ b/mirai-core/src/commonMain/kotlin/network/QQAndroidBotNetworkHandler.kt @@ -615,6 +615,7 @@ internal class QQAndroidBotNetworkHandler(coroutineContext: CoroutineContext, bo suspend fun OutgoingPacket.sendWithoutExpect() { check(bot.isActive) { "bot is dead therefore can't send ${this.commandName}" } check(this@QQAndroidBotNetworkHandler.isActive) { "network is dead therefore can't send any packet" } + check(channel.isOpen) { "network channel is closed" } logger.verbose { "Send: ${this.commandName}" } channel.send(delegate) }