Skip to content

Commit

Permalink
Keep subscription options and userProperties on resubscribe (#113)
Browse files Browse the repository at this point in the history
Co-authored-by: Juergen Werner <[email protected]>
  • Loading branch information
pogojotz and Juergen Werner authored Sep 18, 2024
1 parent 6492ead commit 310c7a6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/src/mqtt_subscription_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@ class MqttSubscriptionManager {
void resubscribe() {
for (final subscription in subscriptions.values) {
_createNewSubscription(
subscription.topic.rawTopic, subscription.maximumQos);
subscription.topic.rawTopic, subscription.maximumQos,
userProperties: subscription.userProperties,
option: subscription.option);
}
subscriptions.clear();
}
Expand Down Expand Up @@ -394,7 +396,9 @@ class MqttSubscriptionManager {
'MttSubscriptionManager::_resubscribe - resubscribing from auto reconnect ${resubscribeEvent.fromAutoReconnect}');
for (final subscription in subscriptions.values) {
_createNewSubscription(
subscription.topic.rawTopic, subscription.maximumQos);
subscription.topic.rawTopic, subscription.maximumQos,
userProperties: subscription.userProperties,
option: subscription.option);
}
subscriptions.clear();
} else {
Expand Down

0 comments on commit 310c7a6

Please sign in to comment.