Skip to content

Commit

Permalink
fixup: sorry linux
Browse files Browse the repository at this point in the history
  • Loading branch information
dlon committed Dec 16, 2024
1 parent a122a93 commit 05176d5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions talpid-wireguard/src/ephemeral.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ pub async fn config_ephemeral_peers(
retry_attempt,
obfuscator,
close_obfs_sender,
#[cfg(not(target_os = "android"))]
connectivity,
#[cfg(target_os = "android")]
tun_provider,
)
Expand All @@ -114,7 +116,7 @@ async fn config_ephemeral_peers_inner(
#[cfg(target_os = "android")] tun_provider: Arc<Mutex<TunProvider>>,
) -> Result<(), CloseMsg> {
#[cfg(not(target_os = "android"))]
reestablish_tunnel_connection(tunnel, connectivity).await?;
establish_tunnel_connection(tunnel, connectivity).await?;

let ephemeral_private_key = PrivateKey::new_from_random();
let close_obfs_sender = close_obfs_sender.clone();
Expand Down Expand Up @@ -155,7 +157,7 @@ async fn config_ephemeral_peers_inner(
.await?;

#[cfg(not(target_os = "android"))]
reestablish_tunnel_connection(tunnel, connectivity).await?;
establish_tunnel_connection(tunnel, connectivity).await?;

let entry_ephemeral_peer = request_ephemeral_peer(
retry_attempt,
Expand Down Expand Up @@ -295,7 +297,7 @@ async fn reconfigure_tunnel(
/// force a WireGuard handshake.
/// This should reduce the number of PQ timeouts.
#[cfg(not(target_os = "android"))]
async fn reestablish_tunnel_connection(
async fn establish_tunnel_connection(
tunnel: &Arc<AsyncMutex<Option<TunnelType>>>,
connectivity: &mut connectivity::Check<connectivity::Cancellable>,
) -> Result<(), CloseMsg> {
Expand Down

0 comments on commit 05176d5

Please sign in to comment.