diff --git a/core/src/main/groovy/com/muwire/core/EventBus.groovy b/core/src/main/groovy/com/muwire/core/EventBus.groovy index 5b43ca1f..d10ed868 100644 --- a/core/src/main/groovy/com/muwire/core/EventBus.groovy +++ b/core/src/main/groovy/com/muwire/core/EventBus.groovy @@ -11,10 +11,10 @@ class EventBus { private Map handlers = new HashMap() void publish(Event e) { - log.fine "publishing event of type ${e.getClass().getSimpleName()}" + log.fine "publishing event of type ${e.getClass().getSimpleName()} seqNo ${e.seqNo} timestamp ${e.timestamp}" def currentHandlers final def clazz = e.getClass() - synchronized(handlers) { + synchronized(this) { currentHandlers = handlers.getOrDefault(clazz, []) } currentHandlers.each {