From 4362de4540efe25a56e72cb5db20b4ad7f2a4f2d Mon Sep 17 00:00:00 2001 From: ORelio Date: Sun, 24 May 2020 19:57:32 +0200 Subject: [PATCH] Fix #1018 (ThreadAbortException) --- MinecraftClient/Protocol/Handlers/Protocol18.cs | 2 +- MinecraftClient/Protocol/ProtocolHandler.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MinecraftClient/Protocol/Handlers/Protocol18.cs b/MinecraftClient/Protocol/Handlers/Protocol18.cs index 2c1cef89..5801a1ae 100644 --- a/MinecraftClient/Protocol/Handlers/Protocol18.cs +++ b/MinecraftClient/Protocol/Handlers/Protocol18.cs @@ -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}).", diff --git a/MinecraftClient/Protocol/ProtocolHandler.cs b/MinecraftClient/Protocol/ProtocolHandler.cs index c0af5bdf..4b6fa5ad 100644 --- a/MinecraftClient/Protocol/ProtocolHandler.cs +++ b/MinecraftClient/Protocol/ProtocolHandler.cs @@ -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;