Fix #1018 (ThreadAbortException)

This commit is contained in:
ORelio 2020-05-24 19:57:32 +02:00
parent b2bcfca8ec
commit 4362de4540
2 changed files with 2 additions and 2 deletions

View file

@ -724,7 +724,7 @@ namespace MinecraftClient.Protocol.Handlers
}
catch (Exception innerException)
{
if (innerException is SocketException || innerException.InnerException is SocketException)
if (innerException is SocketException || innerException.InnerException is SocketException || innerException is ThreadAbortException)
throw; //Connection lost rather than invalid data
throw new System.IO.InvalidDataException(
String.Format("Failed to process incoming packet of type {0}. (PacketID: {1}, Protocol: {2}, LoginPhase: {3}, InnerException: {4}).",

View file

@ -90,7 +90,7 @@ namespace MinecraftClient.Protocol
{
if (protocolversion != 0 && protocolversion != protocolversionTmp)
ConsoleIO.WriteLineFormatted("§8Server reports a different version than manually set. Login may not work.");
if (protocolversion == 0 && protocolversionTmp == 0)
if (protocolversion == 0 && protocolversionTmp <= 1)
ConsoleIO.WriteLineFormatted("§8Server does not report its protocol version, autodetection will not work.");
if (protocolversion == 0)
protocolversion = protocolversionTmp;