mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2024-10-08 05:47:36 +02:00
Do not catch exception in sendRawPacket
This commit is contained in:
parent
20d3f9080b
commit
83166f6b17
@ -52,18 +52,10 @@ public class VRUserConnection extends UserConnection {
|
|||||||
packet.release();
|
packet.release();
|
||||||
final Channel channel = this.getChannel();
|
final Channel channel = this.getChannel();
|
||||||
if (currentThread) {
|
if (currentThread) {
|
||||||
try {
|
|
||||||
PipelineUtil.getPreviousContext("decoder", channel.pipeline()).fireChannelRead(copy);
|
PipelineUtil.getPreviousContext("decoder", channel.pipeline()).fireChannelRead(copy);
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
channel.eventLoop().submit(() -> {
|
channel.eventLoop().submit(() -> {
|
||||||
try {
|
|
||||||
PipelineUtil.getPreviousContext("decoder", channel.pipeline()).fireChannelRead(copy);
|
PipelineUtil.getPreviousContext("decoder", channel.pipeline()).fireChannelRead(copy);
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -79,12 +71,7 @@ public class VRUserConnection extends UserConnection {
|
|||||||
copy.writeBytes(packet);
|
copy.writeBytes(packet);
|
||||||
packet.release();
|
packet.release();
|
||||||
final Channel channel = this.getChannel();
|
final Channel channel = this.getChannel();
|
||||||
try {
|
|
||||||
PipelineUtil.getPreviousContext("decoder", channel.pipeline()).fireChannelRead(copy);
|
PipelineUtil.getPreviousContext("decoder", channel.pipeline()).fireChannelRead(copy);
|
||||||
return channel.newSucceededFuture();
|
return channel.newSucceededFuture();
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
return channel.newFailedFuture(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ import java.util.UUID;
|
|||||||
public class VRViaAPI implements ViaAPI<Void> {
|
public class VRViaAPI implements ViaAPI<Void> {
|
||||||
@Override
|
@Override
|
||||||
public int getPlayerVersion(Void o) {
|
public int getPlayerVersion(Void o) {
|
||||||
throw new UnsupportedOperationException("WHAT??? A INSTANCE OF VOID???");
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -68,7 +68,7 @@ public class VRViaAPI implements ViaAPI<Void> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendRawPacket(Void o, ByteBuf byteBuf) throws IllegalArgumentException {
|
public void sendRawPacket(Void o, ByteBuf byteBuf) throws IllegalArgumentException {
|
||||||
throw new UnsupportedOperationException("WHAT??? A INSTANCE OF VOID???");
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user