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

Use a singleton for COMLibrary to fix issue #139 #143

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

FantasyTeddy
Copy link
Contributor

The COMLibrary can not be created more than once (see ohadravid/wmi-rs#37).
Therefore, let's store the resulting WMIConnection as a singleton which would also improve performance, since the WMI connection needs to be created only once.

Additionally, I bumped the version of the wmi crate.

@grtcdr
Copy link
Member

grtcdr commented Mar 17, 2023

Thanks a lot, Matthias. Your help is, as always, really appreciated!

@grtcdr grtcdr merged commit 3ef1f8f into Macchina-CLI:main Mar 17, 2023
@grtcdr grtcdr linked an issue Mar 17, 2023 that may be closed by this pull request
@FantasyTeddy FantasyTeddy deleted the fix-wmi-connection-problem branch March 17, 2023 13:18
@FantasyTeddy
Copy link
Contributor Author

Glad I can help :)

Carterpersall added a commit to Carterpersall/libmacchina that referenced this pull request Mar 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

os_name() only works once on Windows
2 participants