mirror of
https://github.com/PaperMC/Waterfall.git
synced 2024-09-27 22:17:57 +02:00
server is the client and not server is the server (Fixes #631)
This commit is contained in:
parent
6702e0f69b
commit
d43773ad9c
@ -1,4 +1,4 @@
|
|||||||
From b33cec4e8b6ef1f9189a03fae0cc83d894b6f617 Mon Sep 17 00:00:00 2001
|
From 6ec81191c882a0728141740b9f61b6162ddb6907 Mon Sep 17 00:00:00 2001
|
||||||
From: Shane Freeder <theboyetronic@gmail.com>
|
From: Shane Freeder <theboyetronic@gmail.com>
|
||||||
Date: Fri, 12 Oct 2018 14:28:52 +0100
|
Date: Fri, 12 Oct 2018 14:28:52 +0100
|
||||||
Subject: [PATCH] Ignore empty packets
|
Subject: [PATCH] Ignore empty packets
|
||||||
@ -8,7 +8,7 @@ packets will be ignored. While empty packets are a sign of bad plugins,
|
|||||||
they are effectivly harmless vs the cost of the exception in general
|
they are effectivly harmless vs the cost of the exception in general
|
||||||
|
|
||||||
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java b/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java
|
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java b/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java
|
||||||
index 961887c9..13565e4e 100644
|
index 961887c9..8b7e0708 100644
|
||||||
--- a/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java
|
--- a/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java
|
||||||
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java
|
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java
|
||||||
@@ -43,6 +43,12 @@ public class MinecraftDecoder extends MessageToMessageDecoder<ByteBuf>
|
@@ -43,6 +43,12 @@ public class MinecraftDecoder extends MessageToMessageDecoder<ByteBuf>
|
||||||
@ -16,7 +16,7 @@ index 961887c9..13565e4e 100644
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
+ // Waterfall start
|
+ // Waterfall start
|
||||||
+ if (in.readableBytes() == 0 && server) {
|
+ if (in.readableBytes() == 0 && !server) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // Waterfall end
|
+ // Waterfall end
|
||||||
|
Loading…
Reference in New Issue
Block a user