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

Issue with scheduled_task #1425

Closed
mattdurham opened this issue Mar 4, 2024 · 1 comment · Fixed by #1451
Closed

Issue with scheduled_task #1425

mattdurham opened this issue Mar 4, 2024 · 1 comment · Fixed by #1451

Comments

@mattdurham
Copy link
Contributor

The scheduled_task returns CO_E_NOTINITIALIZED when I try to use it. I think it is getting initialized in build but then uninited. if I remove this line https://github.com/prometheus-community/windows_exporter/blob/master/pkg/collector/scheduled_task/scheduled_task.go#L130 it works as expected.

@mattdurham
Copy link
Contributor Author

mattdurham commented Mar 4, 2024

CoUninitialize should be called on application shutdown, as the last call made to the COM library after the application hides its main windows and falls through its main message loop.

https://learn.microsoft.com/en-us/windows/win32/api/combaseapi/nf-combaseapi-couninitialize

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 a pull request may close this issue.

1 participant