Skip to content

Commit

Permalink
It compiles!
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusPettersson98 committed Jan 29, 2025
1 parent 192e1af commit 42155fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
19 changes: 10 additions & 9 deletions talpid-routing/src/unix/android.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,29 +88,30 @@ impl RouteManagerImpl {

match command {
RouteManagerCommand::Shutdown(tx) => {
let _ = tx.send(()); // TODO: Surely we can do better than this
let _ = tx.send(());
break;
}
RouteManagerCommand::AddRoutes(routes, tx) => {
if Self::has_routes(self.last_state.as_ref(), &routes) {
let _ = tx.send(R)
}else {
self.waiting_for_route.push((tx, routes));
let _ = tx.send(Ok(()));
} else {
self.waiting_for_route.push_back((tx, routes));
}
}
RouteManagerCommand::ClearRoutes => (),
}
}

route_update = self.network_state_updates.next().fuse() => {
for _ in 0..waiting_for_route.len() {
let (tx, routes) = wait_for_routes.pop_front();
for _ in 0..self.waiting_for_route.len() {
let Some((tx, routes)) = self.waiting_for_route.pop_front() else { break };

if tx.is_cancelled() {
} else if Self::has_routes(route_update.as_ref(), routes) {
if tx.is_canceled() {
// do nothing, drop the sender
} else if Self::has_routes(route_update.as_ref(), &routes) {
let _ = tx.send(Ok(()));
} else {
wait_for_routes.push_back((tx, routes));
self.waiting_for_route.push_back((tx, routes));
}
}

Expand Down
1 change: 0 additions & 1 deletion talpid-wireguard/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ impl WireguardMonitor {
log_path: Option<&Path>,
args: TunnelArgs<'_>,
) -> Result<WireguardMonitor> {
use futures::StreamExt;
use talpid_routing::RequiredRoute;

let desired_mtu = get_desired_mtu(params);
Expand Down

0 comments on commit 42155fd

Please sign in to comment.