Skip to content

fix(sdk): Refactored logic and consolidated connected status control #44

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rlabbeptc
Copy link
Collaborator

@rlabbeptc rlabbeptc commented Jul 8, 2025

During integration testing I noticed that if the GetProductInfoAsync method was called prior to TestConnectionAsync, the TestConnectionAsync method would return a false indicating that the connection test failed.

After reviewing I noticed that teh GetProductInfoAsync would modify the m_isConnected property, which would cause the TestConnectionAsync to fail.

Solution was to isolate the m_IsConencted to only be controlled by the TestConnectionAsync since it's the only method currently that uses the property. I also refactored the logic of TestConnectionAsync to be a bit clearer on the methods checks.

Also updated the authentication check to use the project properties endpoint instead of doc. Doc will be a larger return call for Kepware Server instances.

I did some smoke testing with the SyncService and it seems to be working as expected.

@rlabbeptc rlabbeptc marked this pull request as ready for review July 8, 2025 18:37
@rlabbeptc rlabbeptc requested a review from BoBiene July 8, 2025 18:37
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.

1 participant