Skip to content

Commit

Permalink
More review feedback fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun committed Nov 15, 2024
1 parent 63af599 commit 7d2f355
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion talpid-wireguard/src/ephemeral.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@ async fn reconfigure_tunnel(

let tunnel = lock.take().expect("tunnel was None");

let new_tunnel = tunnel.better_set_config(&config).unwrap();
let new_tunnel = tunnel
.better_set_config(&config)
.map_err(|e| SetupError(Error::TunnelError(e)))?;

*lock = Some(new_tunnel);
Ok(config)
Expand Down
4 changes: 2 additions & 2 deletions talpid-wireguard/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -777,11 +777,11 @@ impl WireguardMonitor {
let config = Self::patch_allowed_ips(config, gateway_only);

#[cfg(target_os = "android")]
let tunnel = if config.is_multihop() {
let tunnel = if let Some(exit_peer) = &config.exit_peer {
WgGoTunnel::start_multihop_tunnel(
#[allow(clippy::needless_borrow)]
&config,
config.exit_peer.clone().unwrap(),
exit_peer.clone(),
log_path,
tun_provider,
routes,
Expand Down

0 comments on commit 7d2f355

Please sign in to comment.