[mqtt.generic] Fix re-subscribing on new connection (#8920)

Signed-off-by: Jochen Klein <git@jochen.susca.de>
This commit is contained in:
Jochen Klein 2020-11-01 00:57:34 +01:00 committed by GitHub
parent 8abcc252df
commit ddb5f9a3bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -290,7 +290,7 @@ public class ChannelState implements MqttMessageSubscriber {
int timeout) {
synchronized (futureLock) {
// if the connection is still the same, the subscription is still present, otherwise we need to renew
if (hasSubscribed || !future.isDone() && connection.equals(this.connection)) {
if ((hasSubscribed || !future.isDone()) && connection.equals(this.connection)) {
return future;
}
hasSubscribed = false;