From 771a5b9e08d9292c3a11878c7c4dbb2d7ee4c643 Mon Sep 17 00:00:00 2001 From: ORelio Date: Sat, 27 Feb 2021 22:37:19 +0100 Subject: [PATCH] Catch Zlib exceptions (#1483) Consider that connection is lost on invalid Zlib data --- MinecraftClient/Protocol/Handlers/Protocol18.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/MinecraftClient/Protocol/Handlers/Protocol18.cs b/MinecraftClient/Protocol/Handlers/Protocol18.cs index 2918c0d1..dee3cb52 100644 --- a/MinecraftClient/Protocol/Handlers/Protocol18.cs +++ b/MinecraftClient/Protocol/Handlers/Protocol18.cs @@ -193,6 +193,7 @@ namespace MinecraftClient.Protocol.Handlers catch (System.IO.IOException) { return false; } catch (SocketException) { return false; } catch (NullReferenceException) { return false; } + catch (Ionic.Zlib.ZlibException) { return false; } return true; }