mirror of
https://github.com/PaperMC/Waterfall.git
synced 2024-11-06 10:45:37 +01:00
33 lines
1.3 KiB
Diff
33 lines
1.3 KiB
Diff
From b38fb97cbf65ca5dc17ae20774c3036622b54754 Mon Sep 17 00:00:00 2001
|
|
From: foss-mc <69294560+foss-mc@users.noreply.github.com>
|
|
Date: Wed, 16 Dec 2020 18:36:08 +0800
|
|
Subject: [PATCH] Finish early to avoid multiple incoming packets
|
|
|
|
|
|
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 b402d1d3..47440b2c 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
|
|
@@ -464,6 +464,8 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|
{
|
|
Preconditions.checkState( thisState == State.ENCRYPT, "Not expecting ENCRYPT" );
|
|
|
|
+ // FlameCord - Finish here to avoid multiple incoming packets
|
|
+ thisState = State.FINISHING;
|
|
SecretKey sharedKey = EncryptionUtil.getSecret( encryptResponse, request );
|
|
// Waterfall start
|
|
if (sharedKey instanceof SecretKeySpec) {
|
|
@@ -523,6 +525,9 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|
|
|
private void finish()
|
|
{
|
|
+ // FlameCord - Finish here to avoid multiple incoming packets
|
|
+ thisState = State.FINISHING;
|
|
+
|
|
if ( isOnlineMode() )
|
|
{
|
|
// Check for multiple connections
|
|
--
|
|
2.32.0
|
|
|