Skip to content

Commit

Permalink
more debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Jan 10, 2025
1 parent b3cc63a commit bd75f3c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions russh/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ impl<H: Handler> Handle<H> {
return Err(crate::Error::ChannelOpenFailure(reason));
}
None => {
debug!("channel confirmation sender was dropped");
return Err(crate::Error::Disconnect);
}
msg => {
Expand Down Expand Up @@ -805,6 +806,7 @@ where
if kex_done_signal_rx.await.is_err() {
// kex_done_signal Sender is dropped when the session
// fails before a succesful key exchange
debug!("kex_done_signal sender was dropped");
join.await.map_err(crate::Error::Join)??;
return Err(H::Error::from(crate::Error::Disconnect));
}
Expand Down Expand Up @@ -906,6 +908,7 @@ impl Session {
// The kex signal has been consumed, so no one is
// awaiting the result of this coroutine
// We're better off passing the error into the Handler
debug!("disconnected {e:?}");
handler.disconnected(DisconnectReason::Error(e)).await?;
Err(H::Error::from(crate::Error::Disconnect))
}
Expand Down Expand Up @@ -963,6 +966,7 @@ impl Session {
if !pkt.buffer.is_empty() {
#[allow(clippy::indexing_slicing)] // length checked
if pkt.buffer[0] == crate::msg::DISCONNECT {
debug!("received disconnect");
result = self.process_disconnect(&pkt).map_err(H::Error::from);
} else {
self.common.received_data = true;
Expand Down

0 comments on commit bd75f3c

Please sign in to comment.