mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-12-23 17:08:15 +01:00
Should fix any ClosedConnection output
This commit is contained in:
parent
785f0664da
commit
e8cc25baad
@ -8,6 +8,7 @@ import us.myles.ViaVersion.ConnectionInfo;
|
||||
import us.myles.ViaVersion.transformers.IncomingTransformer;
|
||||
import us.myles.ViaVersion.util.PacketUtil;
|
||||
|
||||
import java.nio.channels.ClosedChannelException;
|
||||
import java.util.List;
|
||||
|
||||
public class ViaDecodeHandler extends ByteToMessageDecoder {
|
||||
@ -44,10 +45,12 @@ public class ViaDecodeHandler extends ByteToMessageDecoder {
|
||||
|
||||
@Override
|
||||
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
||||
if (!(cause.getCause().getCause() instanceof CancelException)) {
|
||||
if (!(cause.getCause() instanceof CancelException)) {
|
||||
if (!(cause instanceof CancelException)) {
|
||||
System.out.println("throwing");
|
||||
if (!(cause.getCause().getCause() instanceof CancelException)
|
||||
&& !(cause.getCause().getCause() instanceof ClosedChannelException)) {
|
||||
if (!(cause.getCause() instanceof CancelException)
|
||||
&& !(cause.getCause() instanceof ClosedChannelException)) {
|
||||
if (!(cause instanceof CancelException)
|
||||
&& !(cause instanceof ClosedChannelException)) {
|
||||
if (cause instanceof Exception)
|
||||
throw (Exception) cause;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import us.myles.ViaVersion.util.PacketUtil;
|
||||
import us.myles.ViaVersion.util.ReflectionUtil;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.nio.channels.ClosedChannelException;
|
||||
|
||||
public class ViaEncodeHandler extends MessageToByteEncoder {
|
||||
private final ConnectionInfo info;
|
||||
@ -71,10 +72,12 @@ public class ViaEncodeHandler extends MessageToByteEncoder {
|
||||
|
||||
@Override
|
||||
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
||||
if (!(cause.getCause().getCause() instanceof CancelException)) {
|
||||
if (!(cause.getCause() instanceof CancelException)) {
|
||||
if (!(cause instanceof CancelException)) {
|
||||
System.out.println("throwing");
|
||||
if (!(cause.getCause().getCause() instanceof CancelException)
|
||||
&& !(cause.getCause().getCause() instanceof ClosedChannelException)) {
|
||||
if (!(cause.getCause() instanceof CancelException)
|
||||
&& !(cause.getCause() instanceof ClosedChannelException)) {
|
||||
if (!(cause instanceof CancelException)
|
||||
&& !(cause instanceof ClosedChannelException)) {
|
||||
if (cause instanceof Exception)
|
||||
throw (Exception) cause;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user