Closed brudo closed 6 years ago
@BrandonPotter this is the change I committed on my branch last night. Anything further you would like to see? What do you think of the caching idea I mentioned above? Or shall I just merge?
I will just merge this now, since I should have included it in the original PR anyway. If there are other changes needed in this area we could always do another pull request.
This adds a try/catch handler around a previously unprotected call to GetAlllNetworkInterfaces, and simply does not boost the ranking if an error occurs when checking whether the NIC is the default router. (The extracted method could also be enhanced further to cache the result for a few seconds, to avoid repeated calls, but it doesn't do that right now.)