Skip to content

Commit

Permalink
Don't hook VV into pipeline if target == native ver
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianMichael committed Apr 28, 2024
1 parent 3254948 commit d2d5ed4
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ public static void init(final VFPlatform platform) {
*/
public void inject(final Channel channel, final VFNetworkManager networkManager) {
if (channel instanceof SocketChannel) {
if (targetVersion.equals(getNativeVersion())) {
return; // Don't inject ViaVersion into pipeline if there is nothing to translate anyway
}

final UserConnection user = new UserConnectionImpl(channel, true);
new ProtocolPipelineImpl(user);

Expand Down

0 comments on commit d2d5ed4

Please sign in to comment.