Log unusual high unused port finding attempts

This commit is contained in:
Daniel 2021-04-15 23:17:03 +02:00
parent a884a30660
commit f8e5f81a2e

View file

@ -41,6 +41,11 @@ nextPort:
}
}
// Log if it took more than 10 attempts.
if i >= 10 {
log.Warningf("network: took %d attempts to find a suitable unused port for pre-auth", i+1)
}
// The checks have passed. We have found a good unused port.
return port, true
}