mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Fix ping failure causing double failure handling
"Failed to ping this IP" also caused "Failed to determine server version" error, calling HandleFailure() twice.
This commit is contained in:
parent
57c66c82d7
commit
72498a6756
1 changed files with 5 additions and 1 deletions
|
|
@ -167,7 +167,10 @@ namespace MinecraftClient
|
|||
{
|
||||
Console.WriteLine("Retrieving Server Info...");
|
||||
if (!ProtocolHandler.GetServerInfo(Settings.ServerIP, Settings.ServerPort, ref protocolversion))
|
||||
{
|
||||
HandleFailure("Failed to ping this IP.", true, ChatBots.AutoRelog.DisconnectReason.ConnectionLost);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (protocolversion != 0)
|
||||
|
|
@ -210,7 +213,6 @@ namespace MinecraftClient
|
|||
+ '\n' + "mozroots --import --ask-remove");
|
||||
return;
|
||||
}
|
||||
while (Console.KeyAvailable) { Console.ReadKey(false); }
|
||||
HandleFailure(failureMessage, false, ChatBot.DisconnectReason.LoginRejected);
|
||||
}
|
||||
}
|
||||
|
|
@ -258,6 +260,8 @@ namespace MinecraftClient
|
|||
if (!String.IsNullOrEmpty(errorMessage))
|
||||
{
|
||||
ConsoleIO.Reset();
|
||||
while (Console.KeyAvailable)
|
||||
Console.ReadKey(true);
|
||||
Console.WriteLine(errorMessage);
|
||||
|
||||
if (disconnectReason.HasValue)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue