mirror of
https://github.com/PaperMC/Waterfall.git
synced 2024-11-06 10:45:37 +01:00
d75d7d1edc
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by 2LStudios and as with ANY update, please do your own testing Waterfall Changes:a5c78a9
(Maybe) Fix javadoc searcheb920b8
Updated Upstream (BungeeCord)8e9b90a
fix compile-native not working on linuxee819df
Updated Upstream (BungeeCord)66601f7
[ci skip] link to javadocs page instead of attempting direct
42 lines
1.7 KiB
Diff
42 lines
1.7 KiB
Diff
From f8d0abde43d1fa6abc45631b372e5a71d1af2f48 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 554526a3..e643d8a7 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
|
|
@@ -447,6 +447,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.FINISHED;
|
|
SecretKey sharedKey = EncryptionUtil.getSecret( encryptResponse, request );
|
|
// Waterfall start
|
|
if (sharedKey instanceof SecretKeySpec) {
|
|
@@ -506,6 +508,9 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|
|
|
private void finish()
|
|
{
|
|
+ // FlameCord - Finish here to avoid multiple incoming packets
|
|
+ thisState = State.FINISHED;
|
|
+
|
|
if ( isOnlineMode() )
|
|
{
|
|
// Check for multiple connections
|
|
@@ -587,8 +592,6 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|
}
|
|
|
|
userCon.connect( server, null, true, ServerConnectEvent.Reason.JOIN_PROXY );
|
|
-
|
|
- thisState = State.FINISHED;
|
|
}
|
|
}
|
|
} );
|
|
--
|
|
2.32.0.windows.1
|
|
|