diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-10-12 13:50:20 -0300 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-10-16 10:38:11 -0300 |
| commit | cf704402133750b02bd26e62cb54992df3765bce (patch) | |
| tree | f1d1d6af05f0b0ec8dc4988e11262b89fc128dcd /mullvad-cli | |
| parent | 691125bc746ac8a0ad1cf3121c871f955fab9007 (diff) | |
| download | mullvadvpn-cf704402133750b02bd26e62cb54992df3765bce.tar.xz mullvadvpn-cf704402133750b02bd26e62cb54992df3765bce.zip | |
Send tunnel endpoint on connected and connecting
Diffstat (limited to 'mullvad-cli')
| -rw-r--r-- | mullvad-cli/src/cmds/status.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mullvad-cli/src/cmds/status.rs b/mullvad-cli/src/cmds/status.rs index 11e436d34a..d25a591726 100644 --- a/mullvad-cli/src/cmds/status.rs +++ b/mullvad-cli/src/cmds/status.rs @@ -31,8 +31,9 @@ impl Command for Status { for new_state in rpc.new_state_subscribe()? { print_state(&new_state); - if new_state == Connected || new_state == Disconnected { - print_location(&mut rpc)?; + match new_state { + Connected(_) | Disconnected => print_location(&mut rpc)?, + _ => {} } } } @@ -44,8 +45,8 @@ fn print_state(state: &TunnelStateTransition) { print!("Tunnel status: "); match state { Blocked(reason) => println!("Blocked ({})", reason), - Connected => println!("Connected"), - Connecting => println!("Connecting..."), + Connected(_) => println!("Connected"), + Connecting(_) => println!("Connecting..."), Disconnected => println!("Disconnected"), Disconnecting(_) => println!("Disconnecting..."), } |
