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

setSession to nil in recreateSession action to avoid unnecessary CloseSession #700

Conversation

mvandergrift
Copy link
Contributor

In the client.go monitor loop, the recreateSession action builds a new session on the assumption that the server is no longer holding the previous. It does not clear the value of the Client's atomicSession, which leads to CloseSession being called in ActivateSession even if there are no old sessions on the server to be removed.

This behavior is referenced in issue #673.

…ssion.

In the client.go monitor loop, the recreateSession action builds a new session on the assumption that the server is no longer holding the previous. It does not clear the value of atomicSession, which leads to CloseSession being called in ActivateSession even if there are no old sessions to be removed.

This behvior was referenced in issue gopcua#673.
Copy link
Member

@magiconair magiconair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good catch and I agree. I hope this fixes the issue in #673

@magiconair
Copy link
Member

I'm going to cut a new release once this is merged. @law-dwg could you maybe test if this fixes your problem as well?

@magiconair magiconair merged commit 7cf7173 into gopcua:main Dec 7, 2023
5 checks passed
@magiconair magiconair added this to the v0.5.3 milestone Dec 7, 2023
@magiconair
Copy link
Member

Released v0.5.3

@mvandergrift mvandergrift deleted the libremfg-clear-local-session-on-recreate branch December 8, 2023 00:56
@law-dwg
Copy link

law-dwg commented Dec 8, 2023

Works from my side, thanks!

@magiconair
Copy link
Member

Awesome!!! Thank you very much both @mvandergrift and @law-dwg

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.

3 participants