Skip to content

Commit

Permalink
refresh the session when connecting to a new network
Browse files Browse the repository at this point in the history
  • Loading branch information
pythops committed Jun 27, 2024
1 parent ada4f8c commit fe50c9a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,17 @@ pub async fn handle_key_events(
.unwrap()
.new_networks[net_index]
.clone();

let mode = app.current_mode.clone();
tokio::spawn(async move {
net.connect(sender.clone())
.await
.unwrap();

sender
.clone()
.send(Event::Reset(mode))
.unwrap();
});
}
}
Expand Down

0 comments on commit fe50c9a

Please sign in to comment.