Explicit check for address type, now check if an addr passed is IPv6. Otherwise, network var will remain empty.
This commit is contained in:
parent
5bd6120ae5
commit
72d3104150
@ -52,7 +52,7 @@ func main() {
|
|||||||
|
|
||||||
if ap.Addr().Is4() {
|
if ap.Addr().Is4() {
|
||||||
network = "tcp4"
|
network = "tcp4"
|
||||||
} else {
|
} else if ap.Addr().Is6() {
|
||||||
network = "tcp6"
|
network = "tcp6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user