Skip to content

Commit

Permalink
fixup! Remove split tunnel interface if split tunneling is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusPettersson98 committed Aug 27, 2024
1 parent 0f6a668 commit 998ca2f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions talpid-core/src/split_tunnel/macos/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,12 +428,14 @@ impl State {
// interface from the user's system.
State::Active {
route_manager,
process,
mut process,
tun_handle,
vpn_interface,
} if paths.is_empty() => {
drop(tun_handle);
drop(process);
if let Err(error) = tun_handle.shutdown().await {
log::error!("Failed to stop split tunnel: {error}");
}
process.shutdown().await;
Ok(State::StandBy {
route_manager,
vpn_interface,
Expand Down

0 comments on commit 998ca2f

Please sign in to comment.