mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-23 06:50:25 +01:00
Fix a deadlock that could happen in offline mode when shutting down the server
This commit is contained in:
parent
cf6a7ce46d
commit
cbef2f32fe
1 changed files with 29 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
From 17f500b0a9b0cf7dcb4f15f72417a1865b5a2c93 Mon Sep 17 00:00:00 2001
|
From db76c7bec6fa44a8942311a28fba5132a5baee28 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sun, 1 Dec 2013 18:18:41 +1100
|
Date: Sun, 1 Dec 2013 18:18:41 +1100
|
||||||
Subject: [PATCH] BungeeCord Support
|
Subject: [PATCH] BungeeCord Support
|
||||||
|
@ -45,7 +45,7 @@ index 8f421f3..727948a 100644
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
|
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
|
||||||
index 9bfb5a2..7410718 100644
|
index 9bfb5a2..5980e91 100644
|
||||||
--- a/src/main/java/net/minecraft/server/LoginListener.java
|
--- a/src/main/java/net/minecraft/server/LoginListener.java
|
||||||
+++ b/src/main/java/net/minecraft/server/LoginListener.java
|
+++ b/src/main/java/net/minecraft/server/LoginListener.java
|
||||||
@@ -84,9 +84,24 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
|
@@ -84,9 +84,24 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
|
||||||
|
@ -74,6 +74,33 @@ index 9bfb5a2..7410718 100644
|
||||||
}
|
}
|
||||||
// Spigot end
|
// Spigot end
|
||||||
|
|
||||||
|
@@ -148,13 +163,19 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
|
||||||
|
this.networkManager.handle(new PacketLoginOutEncryptionBegin(this.j, this.server.P().getPublic(), this.e));
|
||||||
|
} else {
|
||||||
|
// Spigot start
|
||||||
|
- try {
|
||||||
|
- initUUID();
|
||||||
|
- new LoginHandler().fireEvents();
|
||||||
|
- } catch (Exception ex) {
|
||||||
|
- disconnect("Failed to verify username!");
|
||||||
|
- server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + i.getName(), ex);
|
||||||
|
- }
|
||||||
|
+ initUUID();
|
||||||
|
+ new Thread(new Runnable() {
|
||||||
|
+
|
||||||
|
+ @Override
|
||||||
|
+ public void run() {
|
||||||
|
+ try{
|
||||||
|
+ new LoginHandler().fireEvents();
|
||||||
|
+ } catch (Exception ex) {
|
||||||
|
+ disconnect("Failed to verify username!");
|
||||||
|
+ server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + i.getName(), ex);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }).start();
|
||||||
|
// Spigot end
|
||||||
|
}
|
||||||
|
|
||||||
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 89d0bc5..6bd1847 100644
|
index 89d0bc5..6bd1847 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
|
|
Loading…
Reference in a new issue