Closed disassembledd closed 2 years ago
Sound good to me. I don't think there's a use case for the indefinite wait so we don't need to support it at all IMO (and it wouldn't be unsafe anyway as far as I can tell).
Do you want to open a PR with this change?
Thanks for taking the time to report this!
If you don't mind making the change yourself that'd be great. I mostly operate off of my work device unfortunately!
Hi,
I have identified an issue within
WMIConnection::create_services
where it is passing 0 forlSecurityFlags
when callingIWbemLocator::ConnectServer
. According to Microsoft docs, this causes the API to attempt to connect indefinitely, leading to moments where a simple query will halt the entire program.I suggest the default for
lSecurityFlags
be changed to WBEM_FLAG_CONNECT_USE_MAX_WAIT and an unsafe option be given to wait indefinitely to prevent future cases such as this.