ARTEMIS-4972 Use Lock in start() for Binding Variables

This commit is contained in:
Yashashree Chopada 2024-08-22 00:53:41 +05:30 committed by Justin Bertram
parent ffafbf350a
commit f9b912baf0
1 changed files with 9 additions and 3 deletions

View File

@ -322,9 +322,15 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract {
if (started)
return;
if (expectedBindings == null) {
// just in case the component is restarted
expectedBindings = new LinkedList<>();
lock.lock();
try {
if (expectedBindings == null) {
// just in case the component is restarted
expectedBindings = new LinkedList<>();
}
} finally {
lock.unlock();
}
if (reaperPeriod > 0 && groupTimeout > 0) {