Hi Jason

I'm not a windows users so can not test, but it seems to me that Microsoft have API's to indicate the network status.

This to indicate if there is a connection
https://docs.microsoft.com/en-us/windows/win32/api/wininet/nf-wininet-internetgetconnectedstate
This to indicate if there is route-able service. It seem this is deprecated for windows 10.
https://docs.microsoft.com/en-us/windows/win32/api/wininet/nf-wininet-internetcheckconnectiona
There is reference to a win10 version, in the notes.

Not sure if this helps

Cheers
Mike


On 29/1/21 10:53 am, Jason A. Donenfeld wrote:
Hi Joshua,

Thanks for the bug report. Windows is usually all about heuristics.
Here's the current algorithm:

- If the system has booted within the last 4 minutes, it retries 40
times. Otherwise it retries 10 times.
- If the resolution fails with a temporary error, or if it fails with
a permanent error but there's no available internet connection, then
we sleep for 4 seconds and try again.
- If we try the 40 or 10 times over the 160 or 40 seconds and don't
succeed, then we fail and shut down the service.

It sounds like that set of heuristics isn't working out so great for
your use case. How long do those computers usually take to obtain an
Internet connection? If you could run some estimates on that, and come
up with some reasonable length of time ("not more than 3 minutes" for
example) then maybe we could just double that and make it the new
timeout? Or maybe you have a different idea?

Jason


Reply via email to