mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-24 14:30:09 +08:00
Fix unhandled BotOfflineEvent.Force
This commit is contained in:
parent
437f9db575
commit
1f97454b37
@ -93,7 +93,7 @@ abstract class BotImpl<N : BotNetworkHandler> constructor(
|
||||
@Suppress("unused")
|
||||
private val offlineListener: Listener<BotOfflineEvent> =
|
||||
this@BotImpl.subscribeAlways(concurrency = Listener.ConcurrencyKind.LOCKED) { event ->
|
||||
if (network.areYouOk()) {
|
||||
if (network.areYouOk() && event !is BotOfflineEvent.Force) {
|
||||
// avoid concurrent re-login tasks
|
||||
return@subscribeAlways
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user