Skip to content

Commit 36da810

Browse files
bugfix: ignore target state match if tunnel breaks
1 parent 8a07e71 commit 36da810

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rustlib/src/tunnel_state.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ impl TunnelState {
134134
let target_args = target_args_recv.borrow_and_update().clone();
135135
tracing::info!(message_id = "Azzlo6j2", ?target_args, "new target args");
136136

137-
if !tunnel_state.borrow().is_target_state(&target_args) {
138-
tracing::info!(message_id = "KT91bgvI", "not in target state");
137+
if !tunnel_state.borrow().is_target_state(&target_args) || disconnect_reason.is_some() {
138+
tracing::info!(message_id = "KT91bgvI", ?disconnect_reason, "not in target state or tunnel broke");
139139

140140
// Drop tunnel if args changed and change to connecting or disconnected as desired
141141
tunnel_state.send_modify(|tunnel_state| match &target_args {

0 commit comments

Comments
 (0)