mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-07 16:40:43 +08:00
life cycle fix
This commit is contained in:
parent
de742bf904
commit
975ca6bb2b
@ -104,6 +104,7 @@ object MiraiConsole {
|
||||
*/
|
||||
fun stop() {
|
||||
PluginManager.disableAllPlugins()
|
||||
CommandManager.cancel()
|
||||
try {
|
||||
bots.forEach {
|
||||
it.get()?.close()
|
||||
|
@ -154,7 +154,9 @@ object CommandManager : Job by {
|
||||
} catch (e: Throwable) {//should never happen
|
||||
e.printStackTrace()
|
||||
}
|
||||
processCommandQueue()
|
||||
if(isActive) {
|
||||
processCommandQueue()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user