Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update PC/_wmimodule.cpp
Co-authored-by: Steve Dower <[email protected]>
  • Loading branch information
aisk and zooba authored Dec 5, 2023
commit 497b14a6e627c445fdec1921d0878c0a3a764d16
8 changes: 4 additions & 4 deletions PC/_wmimodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,10 @@ _wmi_exec_query_impl(PyObject *module, PyObject *query)
}
}

// If current user doesn't have permission to query the WMI, the function
// IWbemLocator::ConnectServer will hang for 5 seconds, and there is no way
// to specify the timeout. So we use an Event object to simulate a timeout.
// More detail: gh-112278.
// gh-112278: If current user doesn't have permission to query the WMI, the
// function IWbemLocator::ConnectServer will hang for 5 seconds, and there
// is no way to specify the timeout. So we use an Event object to simulate
// a timeout.
switch (WaitForSingleObject(data.connectEvent, 100)) {
case WAIT_OBJECT_0:
break;
Expand Down