You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by jo...@apache.org on 2026/01/04 16:51:40 UTC
(sling-org-apache-sling-event) branch SLING-13046 created (now 44b14b4)
This is an automated email from the ASF dual-hosted git repository.
joerghoh pushed a change to branch SLING-13046
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event.git
at 44b14b4 SLING-13046 log an error in case the thread terminates unexpectetly
This branch includes the following new commits:
new 44b14b4 SLING-13046 log an error in case the thread terminates unexpectetly
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(sling-org-apache-sling-event) 01/01: SLING-13046 log an error in case the thread terminates unexpectetly
Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
joerghoh pushed a commit to branch SLING-13046
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-event.git
commit 44b14b492818fb973eaf92d91a73c40b99739f6a
Author: Joerg Hoh <jo...@apache.org>
AuthorDate: Sun Jan 4 17:51:24 2026 +0100
SLING-13046 log an error in case the thread terminates unexpectetly
---
.../event/impl/jobs/config/TopologyHandler.java | 30 ++++++++++++----------
1 file changed, 17 insertions(+), 13 deletions(-)
diff --git a/src/main/java/org/apache/sling/event/impl/jobs/config/TopologyHandler.java b/src/main/java/org/apache/sling/event/impl/jobs/config/TopologyHandler.java
index b922f87..cf940f7 100644
--- a/src/main/java/org/apache/sling/event/impl/jobs/config/TopologyHandler.java
+++ b/src/main/java/org/apache/sling/event/impl/jobs/config/TopologyHandler.java
@@ -88,21 +88,25 @@ public class TopologyHandler implements TopologyEventListener, Runnable {
@Override
public void run() {
- while (isActive.get()) {
- QueueItem item = null;
- try {
- item = this.queue.take();
- } catch (final InterruptedException ie) {
- logger.warn("Thread got interrupted.", ie);
- Thread.currentThread().interrupt();
- isActive.set(false);
- }
- if (isActive.get() && item != null && item.event != null) {
- final JobManagerConfiguration config = this.configuration;
- if (config != null) {
- config.handleTopologyEvent(item.event);
+ try {
+ while (isActive.get()) {
+ QueueItem item = null;
+ try {
+ item = this.queue.take();
+ } catch (final InterruptedException ie) {
+ logger.warn("Thread got interrupted.", ie);
+ Thread.currentThread().interrupt();
+ isActive.set(false);
+ }
+ if (isActive.get() && item != null && item.event != null) {
+ final JobManagerConfiguration config = this.configuration;
+ if (config != null) {
+ config.handleTopologyEvent(item.event);
+ }
}
}
+ } catch (Throwable t) {
+ logger.error("TopologyListener thread terminated unexpectetly", t);
}
}