From d9eb8c66b8554d5c842e2fd75a5f08dd14f56876 Mon Sep 17 00:00:00 2001 From: Robin Lambertz Date: Mon, 17 Jun 2013 00:27:00 +0200 Subject: [PATCH] Change order of boolean so the latch is decremented all the time --- api/src/main/java/net/md_5/bungee/api/event/AsyncEvent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/net/md_5/bungee/api/event/AsyncEvent.java b/api/src/main/java/net/md_5/bungee/api/event/AsyncEvent.java index c35df7b6..e85c4cd2 100644 --- a/api/src/main/java/net/md_5/bungee/api/event/AsyncEvent.java +++ b/api/src/main/java/net/md_5/bungee/api/event/AsyncEvent.java @@ -67,7 +67,7 @@ public class AsyncEvent extends Event { Preconditions.checkState( intents.contains( plugin ), "Plugin %s has not registered intent for event %s", plugin, this ); intents.remove( plugin ); - if ( fired.get() && latch.decrementAndGet() == 0 ) + if ( latch.decrementAndGet() == 0 && fired.get() ) { done.done( (T) this, null ); }