mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2024-07-06 12:04:42 +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();
|
||||
final Channel channel = this.getChannel();
|
||||
if (currentThread) {
|
||||
try {
|
||||
PipelineUtil.getPreviousContext("decoder", channel.pipeline()).fireChannelRead(copy);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
PipelineUtil.getPreviousContext("decoder", channel.pipeline()).fireChannelRead(copy);
|
||||
} else {
|
||||
channel.eventLoop().submit(() -> {
|
||||
try {
|
||||
PipelineUtil.getPreviousContext("decoder", channel.pipeline()).fireChannelRead(copy);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
PipelineUtil.getPreviousContext("decoder", channel.pipeline()).fireChannelRead(copy);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -79,12 +71,7 @@ public class VRUserConnection extends UserConnection {
|
|||
copy.writeBytes(packet);
|
||||
packet.release();
|
||||
final Channel channel = this.getChannel();
|
||||
try {
|
||||
PipelineUtil.getPreviousContext("decoder", channel.pipeline()).fireChannelRead(copy);
|
||||
return channel.newSucceededFuture();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return channel.newFailedFuture(e);
|
||||
}
|
||||
PipelineUtil.getPreviousContext("decoder", channel.pipeline()).fireChannelRead(copy);
|
||||
return channel.newSucceededFuture();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ import java.util.UUID;
|
|||
public class VRViaAPI implements ViaAPI<Void> {
|
||||
@Override
|
||||
public int getPlayerVersion(Void o) {
|
||||
throw new UnsupportedOperationException("WHAT??? A INSTANCE OF VOID???");
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -68,7 +68,7 @@ public class VRViaAPI implements ViaAPI<Void> {
|
|||
|
||||
@Override
|
||||
public void sendRawPacket(Void o, ByteBuf byteBuf) throws IllegalArgumentException {
|
||||
throw new UnsupportedOperationException("WHAT??? A INSTANCE OF VOID???");
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user