mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-11 18:22:08 -07:00
Remove deadlock risk in firing async events
The PluginManager incorrectly used synchronization on firing any event that was marked as synchronous. This synchronized did not even protect any concurrency risk as handlers were already thread safe in terms of mutations during event dispatch. The way it was used, has commonly led to deadlocks on the server, which results in a hard crash. This change removes the synchronize and adds some protection around enable/disable
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Add source block to BlockPhysicsEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 04d0fa1d..64d75934 100644
|
||||
index 04d0fa1df9..64d75934bc 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
|
Reference in New Issue
Block a user