Explorar el Código

Fix unhandled `BotOfflineEvent.Force`

Him188 hace 5 años
padre
commit
1f97454b37
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotImpl.kt

+ 1 - 1
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotImpl.kt

@@ -93,7 +93,7 @@ abstract class BotImpl<N : BotNetworkHandler> constructor(
     @Suppress("unused")
     private val offlineListener: Listener<BotOfflineEvent> =
         [email protected](concurrency = Listener.ConcurrencyKind.LOCKED) { event ->
-            if (network.areYouOk()) {
+            if (network.areYouOk() && event !is BotOfflineEvent.Force) {
                 // avoid concurrent re-login tasks
                 return@subscribeAlways
             }