Added stopping for subscriptions handlers and for unsubscription handlers
This commit is contained in:
parent
e7c4e76851
commit
06f199b936
@ -156,9 +156,11 @@ final class MqttClientImpl implements MqttClient {
|
||||
if (callback != null) {
|
||||
callback.connectionLost(e);
|
||||
}
|
||||
pendingSubscriptions.forEach((id, mqttPendingSubscription) -> mqttPendingSubscription.onChannelClosed());
|
||||
pendingSubscriptions.clear();
|
||||
serverSubscriptions.clear();
|
||||
subscriptions.clear();
|
||||
pendingServerUnsubscribes.forEach((id, mqttPendingServerUnsubscribes) -> mqttPendingServerUnsubscribes.onChannelClosed());
|
||||
pendingServerUnsubscribes.clear();
|
||||
qos2PendingIncomingPublishes.clear();
|
||||
pendingPublishes.forEach((id, mqttPendingPublish) -> mqttPendingPublish.onChannelClosed());
|
||||
|
||||
@ -99,4 +99,8 @@ final class MqttPendingSubscription {
|
||||
return once;
|
||||
}
|
||||
}
|
||||
|
||||
void onChannelClosed(){
|
||||
this.retransmissionHandler.stop();
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,4 +52,8 @@ final class MqttPendingUnsubscription {
|
||||
void onUnsubackReceived(){
|
||||
this.retransmissionHandler.stop();
|
||||
}
|
||||
|
||||
void onChannelClosed(){
|
||||
this.retransmissionHandler.stop();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user