[mqtt.generic] Fix re-subscribing on new connection (#8920)
Signed-off-by: Jochen Klein <git@jochen.susca.de>
This commit is contained in:
parent
8abcc252df
commit
ddb5f9a3bf
|
@ -290,7 +290,7 @@ public class ChannelState implements MqttMessageSubscriber {
|
||||||
int timeout) {
|
int timeout) {
|
||||||
synchronized (futureLock) {
|
synchronized (futureLock) {
|
||||||
// if the connection is still the same, the subscription is still present, otherwise we need to renew
|
// 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;
|
return future;
|
||||||
}
|
}
|
||||||
hasSubscribed = false;
|
hasSubscribed = false;
|
||||||
|
|
Loading…
Reference in New Issue