mirror of
https://github.com/PaperMC/Paper.git
synced 2024-08-23 13:03:05 +02:00
Fix exiting due to count condition eating packets.
This commit is contained in:
parent
cbef2f32fe
commit
5ce6c2914b
|
@ -1,11 +1,11 @@
|
|||
From f7dee00c85a3c65a1132e1aa3f8a5aac417ba887 Mon Sep 17 00:00:00 2001
|
||||
From 24bbbf4ff02ee0450297e8aed42e225bc2c1b532 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <git@md-5.net>
|
||||
Date: Sun, 19 Apr 2015 09:19:39 +1000
|
||||
Subject: [PATCH] Use CLQ for main thread tasks.
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 88640a5..1aa659d 100644
|
||||
index 88640a5..b189c19 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -104,7 +104,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
|
@ -29,7 +29,7 @@ index 88640a5..1aa659d 100644
|
|||
+ // Spigot start
|
||||
+ FutureTask<?> entry;
|
||||
+ int count = this.j.size();
|
||||
+ while ((entry = this.j.poll()) != null && count-- > 0) {
|
||||
+ while (count-- > 0 && (entry = this.j.poll()) != null) {
|
||||
+ SystemUtils.a(entry, MinecraftServer.LOGGER);
|
||||
+ }
|
||||
+ // Spigot end
|
||||
|
|
Loading…
Reference in New Issue
Block a user