Commit Graph
6 Commits
Author SHA1 Message Date
PhyxionNL b8288cbb99 Fix #472 2021-06-17 13:08:45 +02:00
Nick Babcock 993dadd4dd Impose WMI timeouts (#444)
WMI queries do not have a timeout by default and can subsequently hang.
This commit adds timeouts to avoid these hangs.

On timeout, `Get` will throw a `ManagementException` that has an error
code of `ManagementStatus.Timedout`. In the case of abstract storage,
this exception will be silently swallowed and the statistics from WMI
not updated until the next update interval, which seems appropriate.

The storage group, on the other hand, a timeout there would cause an
initialization exception which would be propagated up to the caller
(which seems ok as something must be terribly wrong for that WMI query
to fail).

The code was also updated to call dispose for all the WMI objects. I
don't see this causing a behavior difference, but I found it better to
be safe than sorry.

The timeouts were chosen to be a compromise between returning in a
reasonable timeframe and allowing WMI, which can be terribly slow, to
return the query.
2021-05-14 09:24:50 +02:00
Phyxion 5bd108167d Restore OHM in copyright statement 2020-02-28 11:39:25 +01:00
Phyxion 6309cbe5a5 Apply code style 2020-02-17 13:12:24 +01:00
sebastian-dev fa2ef007af Bugfixes (#155)
* Fix: https://github.com/LibreHardwareMonitor/LibreHardwareMonitor/issues/153
Add temperature Sensor Ranges

Fix: https://github.com/LibreHardwareMonitor/LibreHardwareMonitor/issues/152
New exit function

Fix: https://github.com/LibreHardwareMonitor/LibreHardwareMonitor/pull/138
No drive info exception when LHM is in a Virtual Machine

* Bugfix Update
2019-10-20 10:27:37 +02:00
Phyxion 73378f7c7b Code style #130 (#132)
This closes #99.
2019-09-23 19:29:10 +02:00