From c12cd0c964f408a80ae0ff8ed85bdb535ed916b6 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 21 Jul 2021 09:58:40 +0300 Subject: [PATCH] ci: workaround for failing net tests --- vlib/net/udp.v | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/vlib/net/udp.v b/vlib/net/udp.v index 1df40037b4..cf69619f00 100644 --- a/vlib/net/udp.v +++ b/vlib/net/udp.v @@ -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() { + // Appease compiler + mut addr := Addr{ + addr: AddrData{ + Ip6: Ip6{} + } + } + match raddr.family() { .ip, .ip6 { // Use ip6 dualstack - new_ip6(0, addr_ip6_any) + addr = new_ip6(0, addr_ip6_any) } .unix { - x := temp_unix() ? - x + addr = temp_unix() ? } else { panic('Invalid family') - // Appease compiler - Addr{ - addr: AddrData{ - Ip6: Ip6{} - } - } } } - mut sock := new_udp_socket(addr) ? sock.has_r = true sock.r = raddr