Skip to content

Commit

Permalink
cli: fix problem restarting tunnel with uppercase letter in name (#18…
Browse files Browse the repository at this point in the history
  • Loading branch information
connor4312 authored Apr 25, 2023
1 parent d3da46f commit ab6ba2e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cli/src/tunnels/dev_tunnels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,11 @@ impl DevTunnels {
) -> Result<ActiveTunnel, AnyError> {
let (mut tunnel, persisted) = match self.launcher_tunnel.load() {
Some(mut persisted) => {
let as_lowercase = persisted.name.to_ascii_lowercase();
let preferred_name = preferred_name.unwrap_or(&as_lowercase);
if persisted.name != preferred_name {
(_, persisted) = self.update_tunnel_name(persisted, preferred_name).await?;
if let Some(preferred_name) = preferred_name.map(|n| n.to_ascii_lowercase()) {
if persisted.name.to_ascii_lowercase() != preferred_name {
(_, persisted) =
self.update_tunnel_name(persisted, &preferred_name).await?;
}
}

let (tunnel, persisted, _) = self
Expand Down

0 comments on commit ab6ba2e

Please sign in to comment.