mirror of
https://github.com/PaperMC/Waterfall.git
synced 2024-11-28 21:25:47 +01:00
32 lines
1.7 KiB
Diff
32 lines
1.7 KiB
Diff
From 5b753c311625da73afc78534c0c3da77dc489fe4 Mon Sep 17 00:00:00 2001
|
|
From: Techcable <Techcable@techcable.net>
|
|
Date: Mon, 6 Jun 2016 13:36:10 -0600
|
|
Subject: [PATCH] Don't send KICK packets while in HANDSHAKE state
|
|
|
|
|
|
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
|
index 933a8388..65e57062 100644
|
|
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
|
@@ -278,7 +278,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|
this.handshake = handshake;
|
|
ch.setVersion( handshake.getProtocolVersion() );
|
|
|
|
- // Starting with FML 1.8, a "\0FML\0" token is appended to the handshake. This interferes
|
|
+ // Starting with FML 1.8, a "\0FML\0" token is appended to the handshake. This interferes
|
|
// with Bungee's IP forwarding, so we detect it, and remove it from the host string, for now.
|
|
// We know FML appends \00FML\00. However, we need to also consider that other systems might
|
|
// add their own data to the end of the string. So, we just take everything from the \0 character
|
|
@@ -565,7 +565,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|
@Override
|
|
public void disconnect(final BaseComponent... reason)
|
|
{
|
|
- if ( thisState != State.STATUS && thisState != State.PING )
|
|
+ if ( thisState != State.STATUS && thisState != State.PING && thisState != State.HANDSHAKE ) // Waterfall: Don't kick during handshake
|
|
{
|
|
ch.delayedClose( new Kick( ComponentSerializer.toString( reason ) ) );
|
|
} else
|
|
--
|
|
2.18.0
|
|
|