mirror of
https://github.com/aramperes/onetun.git
synced 2025-09-09 06:38:32 -04:00
udp: remove extra socket iteration in virtual iface
This commit is contained in:
parent
782f5e74bf
commit
47c6c588d2
1 changed files with 0 additions and 6 deletions
|
@ -134,7 +134,6 @@ impl VirtualInterfacePoll for UdpVirtualInterface {
|
|||
_ => {}
|
||||
}
|
||||
|
||||
// Find client socket send data to
|
||||
for (virtual_port, client_handle) in port_client_handle_map.iter() {
|
||||
let client_socket = iface.get_socket::<UdpSocket>(*client_handle);
|
||||
if client_socket.can_send() {
|
||||
|
@ -155,11 +154,6 @@ impl VirtualInterfacePoll for UdpVirtualInterface {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Find client socket recv data from
|
||||
for (virtual_port, client_handle) in port_client_handle_map.iter() {
|
||||
let client_socket = iface.get_socket::<UdpSocket>(*client_handle);
|
||||
if client_socket.can_recv() {
|
||||
match client_socket.recv() {
|
||||
Ok((data, _peer)) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue