mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 08:17:44 +01:00
Ensure that TimedEventExecutor timings are closed (Fixes #1918)
pre this, any event handler firing an exception would leave the timings open, causing the timings stack to be corrupted
This commit is contained in:
parent
973a062bb9
commit
e8b836dec8
@ -169,7 +169,7 @@ index 000000000..8e0cd40e8
|
||||
+}
|
||||
diff --git a/src/main/java/co/aikar/timings/TimedEventExecutor.java b/src/main/java/co/aikar/timings/TimedEventExecutor.java
|
||||
new file mode 100644
|
||||
index 000000000..68f7866e1
|
||||
index 000000000..933ecf9bd
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/TimedEventExecutor.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@ -251,9 +251,9 @@ index 000000000..68f7866e1
|
||||
+ executor.execute(listener, event);
|
||||
+ return;
|
||||
+ }
|
||||
+ timings.startTiming();
|
||||
+ executor.execute(listener, event);
|
||||
+ timings.stopTiming();
|
||||
+ try (Timing ignored = timings.startTiming()){
|
||||
+ executor.execute(listener, event);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java
|
||||
|
Loading…
Reference in New Issue
Block a user