Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger resumeSubscriptions only if there are subscriptions #641

Merged
merged 1 commit into from
Mar 22, 2023

Conversation

DVasselli
Copy link

@DVasselli DVasselli commented Mar 6, 2023

When no subscription is present, then when the reconnect logic kicks in and it tries to get the subscriptions to restart, we get an error saying there are no subscriptions to restart. This triggers the reconnection logic, ending up in an infinite loop.

###Solution
Only resume subscriptions if at least one was found to be present before the client got disconnected

@DVasselli DVasselli marked this pull request as ready for review March 6, 2023 10:55
@magiconair magiconair changed the title client.go/ resume subs only if present Trigger resumeSubscriptions only if there are subscriptions Mar 22, 2023
This patch only sends a PublishRequest after a reconnect when active
subscriptions are present. Sending a PublishRequest when no
subscriptions are present can confuse some servers.
@magiconair magiconair merged commit bc0a18e into gopcua:main Mar 22, 2023
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