gopsutil
gopsutil copied to clipboard
Slow disk.Partitions(true) on Windows with missing mapped network drives
Describe the bug
disk.Partitions(true) can take 20s+ when mapped drives exist on windows and the remote server is not available
The error returned is:
Error 0: The network path was not found.
According to http://www.delphigroups.info/2/3d/477068.html there is no timeout control
Now I raise a PR(#1407) which adds the functionality to handle context to that method. After merging, we can use context.Withtimeout to set the appropriate timeout.