Skip to content

Commit e478a71

Browse files
committed
[feature] Add a warning if at shutdown we appear to have a leak of UpdateListeners
1 parent fbefed7 commit e478a71

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

exist-core/src/main/java/org/exist/storage/NotificationService.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,12 @@ public synchronized void debug() {
100100
}
101101
listeners.keySet().forEach(UpdateListener::debug);
102102
}
103+
104+
@Override
105+
public void shutdown() {
106+
synchronized (this) {
107+
LOG.warn("Expected 0 listeners at shutdown, but {} listeners are still registered", listeners.size());
108+
}
109+
BrokerPoolService.super.shutdown();
110+
}
103111
}

0 commit comments

Comments
 (0)