mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-04 10:11:29 +01:00
Fix a deadlock that could happen in offline mode when shutting down the server
This commit is contained in:
parent
19d9d39eac
commit
98e006c856
1 changed files with 27 additions and 0 deletions
|
@ -74,6 +74,33 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
}
|
}
|
||||||
// Spigot end
|
// Spigot end
|
||||||
|
|
||||||
|
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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