Skip to content

Conversation

@cerenyasa
Copy link
Contributor

Problem

When resubscribeOnAutoReconnect is set to false, and the app tries to subscribe again (from outside the package) to the same topic(s) after an auto-reconnect, the subscriptions and pendingSubscriptions lists are not cleared. As a result, registerSubscription() returns the old, no-longer-active subscription, and a new subscription cannot be created—so the subscribe attempt effectively fails.

Root cause

During auto-reconnect, when resubscribe is disabled (resubscribeOnAutoReconnect=false), the internal subscription state is not reset. A subsequent subscribe call for the same topic ends up reusing a stale/invalid subscription entry.

Fix

When resubscribeOnAutoReconnect is false, subscriptions and pendingSubscriptions are cleared during the auto-reconnect flow. This allows new subscriptions to be created successfully after reconnect, even for the same topic(s).

Notes

This change only affects the resubscribeOnAutoReconnect=false scenario; behavior remains unchanged when the flag is true.

@shamblett shamblett merged commit 7fce852 into shamblett:master Jan 5, 2026
2 checks passed
@shamblett
Copy link
Owner

Great thanks, merged, package re published at version 10.11.4.

@cerenyasa
Copy link
Contributor Author

Great thanks, merged, package re published at version 10.11.4.

Thanks for merging so quickly!

@shamblett
Copy link
Owner

No probs, you just caught me in front of my dev box, the PR was well explained with a simple change so it was easier to just do it than put it on my todo list.

@cerenyasa
Copy link
Contributor Author

Awesome, really appreciate it — thanks again for the quick review and merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants