Skip to content

Commit c594e75

Browse files
committed
Fix MQTT synchronization for recoveryInterval
1 parent 2b1976c commit c594e75

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spring-integration-mqtt/src/main/java/org/springframework/integration/mqtt/inbound/MqttPahoMessageDrivenChannelAdapter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ public class MqttPahoMessageDrivenChannelAdapter extends AbstractMqttMessageDriv
5757

5858
private final MqttPahoClientFactory clientFactory;
5959

60-
private volatile long completionTimeout = DEFAULT_COMPLETION_TIMEOUT;
60+
private int recoveryInterval = DEFAULT_RECOVERY_INTERVAL;
6161

62-
private volatile int recoveryInterval = DEFAULT_RECOVERY_INTERVAL;
62+
private volatile long completionTimeout = DEFAULT_COMPLETION_TIMEOUT;
6363

6464
private volatile IMqttClient client;
6565

@@ -128,7 +128,7 @@ public void setCompletionTimeout(long completionTimeout) {
128128
* @param recoveryInterval the interval.
129129
* @since 4.2.2
130130
*/
131-
public void setRecoveryInterval(int recoveryInterval) {
131+
public synchronized void setRecoveryInterval(int recoveryInterval) {
132132
this.recoveryInterval = recoveryInterval;
133133
}
134134

0 commit comments

Comments
 (0)