Files
spring-integration/spring-integration-mqtt/src
Artem Bilan 8ff7ad798d GH-3627: Fix race condition NPE in MqttPahoMDCA
Fixes https://github.com/spring-projects/spring-integration/issues/3627

The `destroy()`, and therefore `stop()` could be called from the `MqttConnectionFailedEvent` handling
in the same thread resetting the `client` property to `null`.

* Check for `this.client != null` in the next block of the `connectAndSubscribe()` to avoid NPE
* Check for `isActive()` in the `scheduleReconnect()` to be sure do not reconnect if channel adapter
has been stopped already

**Cherry-pick to `5.4.x`**
2021-09-09 14:38:33 -04:00
..