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
1 changed files with 1 additions and 1 deletions

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)