This is an automated email from the ASF dual-hosted git repository.
joerghoh pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-servlets-resolver.git
The following commit(s) were added to refs/heads/master by this push:
new d9ce964 SLING-13266 avoid race on shutdown (#71)
d9ce964 is described below
commit d9ce964e9a33708c5bf645e2a062347d7969fa52
Author: Jörg Hoh <[email protected]>
AuthorDate: Wed Jul 22 18:28:23 2026 +0200
SLING-13266 avoid race on shutdown (#71)
---
.../sling/servlets/resolver/internal/bundle/BundledScriptTracker.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/src/main/java/org/apache/sling/servlets/resolver/internal/bundle/BundledScriptTracker.java
b/src/main/java/org/apache/sling/servlets/resolver/internal/bundle/BundledScriptTracker.java
index 16c2ccb..858ca4d 100644
---
a/src/main/java/org/apache/sling/servlets/resolver/internal/bundle/BundledScriptTracker.java
+++
b/src/main/java/org/apache/sling/servlets/resolver/internal/bundle/BundledScriptTracker.java
@@ -130,8 +130,9 @@ public class BundledScriptTracker implements
BundleTrackerCustomizer<List<Servic
bt.open();
}
+ // synchronized against refreshDispatcher so a concurrent refresh cannot
re-publish dispatchers after shutdown
@Deactivate
- protected void deactivate() {
+ protected synchronized void deactivate() {
BundleTracker<List<ServiceRegistration<Servlet>>> bt =
tracker.getAndSet(null);
if (bt != null) {
bt.close();