1
0
mirror of https://github.com/DNSCrypt/dnscrypt-proxy.git synced 2024-12-28 00:20:13 +01:00

Correctly honor MaxTimeout on Windows, too

This commit is contained in:
Frank Denis 2019-10-22 11:53:59 +02:00
parent 32b691a5c7
commit 560577af00

View File

@ -19,7 +19,7 @@ func NetProbe(address string, timeout int) error {
if timeout < 0 {
timeout = MaxTimeout
} else {
timeout = Max(MaxTimeout, timeout)
timeout = Min(MaxTimeout, timeout)
}
for tries := timeout; tries > 0; tries-- {
pc, err := net.DialUDP("udp", nil, remoteUDPAddr)