mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
OnDisconnect: Call AutoRelog last (#1517)
Call AutoRelog last to leave other bots time to perform cleanup
This commit is contained in:
parent
239900451d
commit
663d617ef6
1 changed files with 5 additions and 1 deletions
|
|
@ -531,7 +531,11 @@ namespace MinecraftClient
|
|||
throw new InvalidOperationException(Translations.Get("exception.user_logout"));
|
||||
}
|
||||
|
||||
foreach (ChatBot bot in bots.ToArray())
|
||||
//Process AutoRelog last to make sure other bots can perform their cleanup tasks first (issue #1517)
|
||||
List<ChatBot> onDisconnectBotList = bots.Where(bot => !(bot is AutoRelog)).ToList();
|
||||
onDisconnectBotList.AddRange(bots.Where(bot => bot is AutoRelog));
|
||||
|
||||
foreach (ChatBot bot in onDisconnectBotList)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue