Skip to content

Commit

Permalink
Merge pull request #57 from ohadravid/feature/use-connect-timeout
Browse files Browse the repository at this point in the history
Use a timeout when calling `ConnectServer`
  • Loading branch information
ohadravid authored Sep 3, 2022
2 parents 11dd669 + 0d5abc1 commit 5137086
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "wmi"
version = "0.11.1"
version = "0.11.2"
authors = ["Ohad Ravid <[email protected]>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
readme = "README.md"
documentation = "https://docs.rs/crate/wmi"
Expand Down
7 changes: 5 additions & 2 deletions src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ use winapi::{
combaseapi::{CoCreateInstance, CoInitializeEx, CoInitializeSecurity, CoSetProxyBlanket},
objbase::COINIT_MULTITHREADED,
objidl::EOAC_NONE,
wbemcli::{CLSID_WbemLocator, IID_IWbemLocator, IWbemLocator, IWbemServices},
wbemcli::{
CLSID_WbemLocator, IID_IWbemLocator, IWbemLocator, IWbemServices,
WBEM_FLAG_CONNECT_USE_MAX_WAIT,
},
},
};

Expand Down Expand Up @@ -200,7 +203,7 @@ impl WMIConnection {
ptr::null_mut(),
ptr::null_mut(),
ptr::null_mut(),
0,
WBEM_FLAG_CONNECT_USE_MAX_WAIT as _,
ptr::null_mut(),
ptr::null_mut(),
&mut p_svc,
Expand Down

0 comments on commit 5137086

Please sign in to comment.