Skip to content

Commit

Permalink
Add tracing to <native_mux_impl::Session as Drop>::drop
Browse files Browse the repository at this point in the history
Signed-off-by: Jiahao XU <[email protected]>
  • Loading branch information
NobodyXu authored Sep 8, 2024
1 parent d6aff59 commit 16cff48
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/native_mux_impl/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ impl Drop for Session {
None => return,
};

let _ = shutdown_mux_master(&self.ctl);
let _res = shutdown_mux_master(&self.ctl);
#[cfg(feature = "tracing")]
if let Err(err) = _res {
tracing::error!("Failed to close ssh session: {}", err);
}
}
}

0 comments on commit 16cff48

Please sign in to comment.