Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-20 06:50:08 +01:00
Should fix any ClosedConnection output
Dieser Commit ist enthalten in:
Ursprung
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;
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren