Change order of boolean so the latch is decremented all the time
This commit is contained in:
parent
7fab3ba372
commit
d9eb8c66b8
@ -67,7 +67,7 @@ public class AsyncEvent<T> extends Event
|
|||||||
{
|
{
|
||||||
Preconditions.checkState( intents.contains( plugin ), "Plugin %s has not registered intent for event %s", plugin, this );
|
Preconditions.checkState( intents.contains( plugin ), "Plugin %s has not registered intent for event %s", plugin, this );
|
||||||
intents.remove( plugin );
|
intents.remove( plugin );
|
||||||
if ( fired.get() && latch.decrementAndGet() == 0 )
|
if ( latch.decrementAndGet() == 0 && fired.get() )
|
||||||
{
|
{
|
||||||
done.done( (T) this, null );
|
done.done( (T) this, null );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user