ci: workaround for failing net tests
parent
d41a4ec662
commit
c12cd0c964
|
@ -233,26 +233,24 @@ fn new_udp_socket(local_addr Addr) ?&UdpSocket {
|
|||
|
||||
fn new_udp_socket_for_remote(raddr Addr) ?&UdpSocket {
|
||||
// Invent a sutible local address for this remote addr
|
||||
addr := match raddr.family() {
|
||||
.ip, .ip6 {
|
||||
// Use ip6 dualstack
|
||||
new_ip6(0, addr_ip6_any)
|
||||
}
|
||||
.unix {
|
||||
x := temp_unix() ?
|
||||
x
|
||||
}
|
||||
else {
|
||||
panic('Invalid family')
|
||||
// Appease compiler
|
||||
Addr{
|
||||
mut addr := Addr{
|
||||
addr: AddrData{
|
||||
Ip6: Ip6{}
|
||||
}
|
||||
}
|
||||
match raddr.family() {
|
||||
.ip, .ip6 {
|
||||
// Use ip6 dualstack
|
||||
addr = new_ip6(0, addr_ip6_any)
|
||||
}
|
||||
.unix {
|
||||
addr = temp_unix() ?
|
||||
}
|
||||
else {
|
||||
panic('Invalid family')
|
||||
}
|
||||
}
|
||||
|
||||
mut sock := new_udp_socket(addr) ?
|
||||
sock.has_r = true
|
||||
sock.r = raddr
|
||||
|
|
Loading…
Reference in New Issue