Add option to exclude local IPv6 candidates. (#4657)
Could be useful option to try in certain conditions where flakey IPv6 infrastructure is suspected for connection issues.
This commit is contained in:
@@ -173,6 +173,11 @@ func MaybeTruncateIP(addr string) string {
|
||||
return addr[:len(addr)-3] + "..."
|
||||
}
|
||||
|
||||
func IsIPv6(addr string) bool {
|
||||
ipAddr := net.ParseIP(addr)
|
||||
return ipAddr != nil && ipAddr.To4() == nil
|
||||
}
|
||||
|
||||
func ChunkProtoBatch[T proto.Message](batch []T, target int) [][]T {
|
||||
var chunks [][]T
|
||||
var start, size int
|
||||
|
||||
Reference in New Issue
Block a user