Try to improve tracing messages when client disconnects

This commit is contained in:
Nathan Sobo 2022-05-12 13:05:05 -06:00
parent a3b9ad75b0
commit 451338061d
2 changed files with 3 additions and 3 deletions

View File

@ -289,7 +289,7 @@ impl Server {
futures::select_biased! {
result = handle_io => {
if let Err(error) = result {
tracing::error!(%error, %user_id, %login, %connection_id, %address, "error handling I/O");
tracing::error!(?error, %user_id, %login, %connection_id, %address, "error handling I/O");
}
break;
}
@ -327,7 +327,7 @@ impl Server {
tracing::info!(%user_id, %login, %connection_id, %address, "signing out");
if let Err(error) = this.sign_out(connection_id).await {
tracing::error!(%user_id, %login, %connection_id, %address, %error, "error signing out");
tracing::error!(%user_id, %login, %connection_id, %address, ?error, "error signing out");
}
Ok(())

View File

@ -190,8 +190,8 @@ impl Peer {
},
},
incoming = read_message => {
let incoming = incoming.context("error reading rpc message from socket")?;
tracing::debug!(%connection_id, "incoming rpc message: received");
let incoming = incoming.context("received invalid RPC message")?;
tracing::debug!(%connection_id, "receive timeout: resetting");
receive_timeout.set(create_timer(RECEIVE_TIMEOUT).fuse());
if let proto::Message::Envelope(incoming) = incoming {