You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GH-9276: Mitigate ConcurrentModificationException in the Mqttv5PahoMessageDrivenChannelAdapter
Fixes: #9276
The current Eclipse Paho client has wrong removal from map logic which leads to the
`ConcurrentModificationException` when we unsubscribe from topic.
* Catch a `ConcurrentModificationException` `this.mqttClient.unsubscribe()` and just log it as an `error`
**Auto-cherry-pick to `6.3.x` & `6.2.x`**
Copy file name to clipboardExpand all lines: spring-integration-mqtt/src/main/java/org/springframework/integration/mqtt/inbound/Mqttv5PahoMessageDrivenChannelAdapter.java
+14-3Lines changed: 14 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@
19
19
importjava.util.ArrayList;
20
20
importjava.util.Arrays;
21
21
importjava.util.Collections;
22
+
importjava.util.ConcurrentModificationException;
22
23
importjava.util.List;
23
24
importjava.util.Map;
24
25
importjava.util.concurrent.locks.Lock;
@@ -289,7 +290,7 @@ protected void doStop() {
289
290
try {
290
291
if (this.mqttClient != null && this.mqttClient.isConnected()) {
0 commit comments