Revert "Don't flush packet queue off main thread"

This reverts commit 1abd2bd279.

Sadly not gonna work due to server pings
This commit is contained in:
Aikar 2020-05-04 04:50:08 -04:00
parent 1abd2bd279
commit c7bc393a87
No known key found for this signature in database
GPG key ID: 401ADFC9891FAAFE

View file

@ -1,4 +1,4 @@
From 10a32d733a851719edd4c52fc25d673f1e3be4fd Mon Sep 17 00:00:00 2001 From 57f98e2c510b576b4d3c94b12384b1bc4b6b5e33 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 2 Mar 2019 14:55:01 -0500 Date: Sat, 2 Mar 2019 14:55:01 -0500
Subject: [PATCH] Handle Excessive Signs in Chunks creating large packets Subject: [PATCH] Handle Excessive Signs in Chunks creating large packets
@ -14,7 +14,7 @@ With further contributions from
Co-Authored-by: Spottedleaf <spottedleaf@spottedleaf.dev> Co-Authored-by: Spottedleaf <spottedleaf@spottedleaf.dev>
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
index b1dededc15..07e3ddb6e9 100644 index b1dededc15..e966b6edcc 100644
--- a/src/main/java/net/minecraft/server/NetworkManager.java --- a/src/main/java/net/minecraft/server/NetworkManager.java
+++ b/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java
@@ -158,19 +158,55 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> { @@ -158,19 +158,55 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
@ -73,7 +73,7 @@ index b1dededc15..07e3ddb6e9 100644
+ +
+ this.packetQueue.addAll(packets); // atomic + this.packetQueue.addAll(packets); // atomic
+ } + }
+ if (MCUtil.isMainThread()) this.sendPacketQueue(); + this.sendPacketQueue(); // ensure only one flush call is made
+ // Paper end + // Paper end
} }