1
0
Fork 0

Actually, ParseAddrPort is needed, since we give ip:port.

This commit is contained in:
Alexander Andreev 2023-05-27 19:30:28 +04:00
parent 114d3cc931
commit e695becbcd
Signed by: Arav
GPG Key ID: D22A817D95815393
1 changed files with 2 additions and 2 deletions

View File

@ -45,12 +45,12 @@ func main() {
network = "unix"
defer os.Remove(*listenAddress)
} else {
ap, err := netip.ParseAddr(*listenAddress)
ap, err := netip.ParseAddrPort(*listenAddress)
if err != nil {
log.Fatalln(err)
}
if ap.Is4() {
if ap.Addr().Is4() {
network = "tcp4"
} else {
network = "tcp6"