diff --git a/src/main/java/us/myles/ViaVersion/handlers/ViaDecodeHandler.java b/src/main/java/us/myles/ViaVersion/handlers/ViaDecodeHandler.java index 08466754d..d283e39e1 100644 --- a/src/main/java/us/myles/ViaVersion/handlers/ViaDecodeHandler.java +++ b/src/main/java/us/myles/ViaVersion/handlers/ViaDecodeHandler.java @@ -34,7 +34,7 @@ public class ViaDecodeHandler extends ByteToMessageDecoder { incomingTransformer.transform(id, bytebuf, newPacket); bytebuf.clear(); bytebuf = newPacket; - } catch (CancelException e) { + } catch (Exception e) { bytebuf.clear(); throw e; } diff --git a/src/main/java/us/myles/ViaVersion/handlers/ViaEncodeHandler.java b/src/main/java/us/myles/ViaVersion/handlers/ViaEncodeHandler.java index 439396ee1..78b839ba5 100644 --- a/src/main/java/us/myles/ViaVersion/handlers/ViaEncodeHandler.java +++ b/src/main/java/us/myles/ViaVersion/handlers/ViaEncodeHandler.java @@ -73,7 +73,7 @@ public class ViaEncodeHandler extends MessageToByteEncoder { bytebuf.clear(); try { outgoingTransformer.transform(id, oldPacket, bytebuf); - } catch (CancelException e) { + } catch (Exception e) { bytebuf.clear(); throw e; } finally {