From bd56c4369022e5f13650f665c890fa07a9594bb6 Mon Sep 17 00:00:00 2001 From: Aaron Chen Date: Tue, 19 Nov 2024 11:49:29 +0800 Subject: [PATCH] fix unknown variable error --- crates/shadowsocks/src/net/sys/windows/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/shadowsocks/src/net/sys/windows/mod.rs b/crates/shadowsocks/src/net/sys/windows/mod.rs index 12e04660397a..a2ff2e4592ed 100644 --- a/crates/shadowsocks/src/net/sys/windows/mod.rs +++ b/crates/shadowsocks/src/net/sys/windows/mod.rs @@ -467,7 +467,7 @@ pub async fn create_inbound_udp_socket(addr: &SocketAddr, ipv6_only: bool) -> io /// Create a `UdpSocket` for connecting to `addr` #[inline(always)] pub async fn create_outbound_udp_socket(af: AddrFamily, opts: &ConnectOpts) -> io::Result { - let bind_addr = match (af, config.bind_local_addr) { + let bind_addr = match (af, opts.bind_local_addr) { (AddrFamily::Ipv4, Some(SocketAddr::V4(addr))) => addr.into(), (AddrFamily::Ipv6, Some(SocketAddr::V6(addr))) => addr.into(), (AddrFamily::Ipv4, ..) => SocketAddr::new(Ipv4Addr::UNSPECIFIED.into(), 0),