Committed by
Gerrit Code Review
Reseting lastStart timestamp on listener ejection and sink notification.
Change-Id: Id13c8517fb4eca84a34ead168055328c236d090b
Showing
2 changed files
with
2 additions
and
0 deletions
... | @@ -84,6 +84,7 @@ public class ListenerRegistry<E extends Event, L extends EventListener<E>> | ... | @@ -84,6 +84,7 @@ public class ListenerRegistry<E extends Event, L extends EventListener<E>> |
84 | lastListener.getClass().getName(), | 84 | lastListener.getClass().getName(), |
85 | System.currentTimeMillis() - lastStart); | 85 | System.currentTimeMillis() - lastStart); |
86 | removeListener(lastListener); | 86 | removeListener(lastListener); |
87 | + lastStart = 0; | ||
87 | } | 88 | } |
88 | } | 89 | } |
89 | 90 | ... | ... |
... | @@ -155,6 +155,7 @@ public class CoreEventDispatcher extends DefaultEventSinkRegistry | ... | @@ -155,6 +155,7 @@ public class CoreEventDispatcher extends DefaultEventSinkRegistry |
155 | public void run() { | 155 | public void run() { |
156 | long delta = System.currentTimeMillis() - lastStart; | 156 | long delta = System.currentTimeMillis() - lastStart; |
157 | if (lastStart > 0 && delta > maxProcessMillis) { | 157 | if (lastStart > 0 && delta > maxProcessMillis) { |
158 | + lastStart = 0; | ||
158 | log.error("Event sink {} exceeded execution time limit: {} ms", | 159 | log.error("Event sink {} exceeded execution time limit: {} ms", |
159 | lastSink.getClass().getName(), delta); | 160 | lastSink.getClass().getName(), delta); |
160 | 161 | ... | ... |
-
Please register or login to post a comment