1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

net.websocket: fix server not listening for IPv4 (#12717)

This commit is contained in:
Toby Webb
2021-12-06 10:10:25 +01:00
committed by GitHub
parent d85111e3dd
commit 09955b7ce8
4 changed files with 34 additions and 26 deletions

View File

@ -237,7 +237,11 @@ fn new_udp_socket_for_remote(raddr Addr) ?&UdpSocket {
}
}
match raddr.family() {
.ip, .ip6 {
.ip {
// Use ip dualstack
addr = new_ip(0, addr_ip_any)
}
.ip6 {
// Use ip6 dualstack
addr = new_ip6(0, addr_ip6_any)
}