Commit 6dc4457
committed
GH-3166: SMLC: synchronize on
Fixes: #3166
The `processorThreadsToInterrupt` is iterated in the `shutdownAndWaitOrCallback()`,
and apparently one of the processors has finished successfully removing itself from the `processorThreadsToInterrupt` list.
This leads to the `ConcurrentModificationException` on the mentioned above iteration.
* Fix `SimpleMessageListenerContainer` making the `processorThreadsToInterrupt` as a `Collections.synchronizedList()`
* Wrap `processorThreadsToInterrupt` iteration in the `shutdownAndWaitOrCallback()` with a `synchronized (this.processorThreadsToInterrupt)`
**Auto-cherry-pick to `3.2.x`**processorThreadsToInterrupt
1 parent e1081de commit 6dc4457
File tree
1 file changed
+5
-2
lines changed- spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener
1 file changed
+5
-2
lines changedLines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
118 | | - | |
| 119 | + | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| |||
706 | 707 | | |
707 | 708 | | |
708 | 709 | | |
709 | | - | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
710 | 713 | | |
711 | 714 | | |
712 | 715 | | |
| |||
0 commit comments