Skip to content

Commit

Permalink
make client disconnects less verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
lilioid committed Mar 26, 2024
1 parent 20c0079 commit 72500f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/net/servers/tcp_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ impl TcpServer {
// fill the line buffer from the network
let n = stream.read_buf(&mut req_buf).await?;
if n == 0 {
return Err(anyhow!("client stream exhausted"));
tracing::debug!("Client stream exhausted, likely disconnected");
return Ok(());
}
tracing::trace!("Received {}KiB stream data: {:?}", n / 1024, req_buf);

Expand Down
3 changes: 2 additions & 1 deletion src/net/servers/unix_sock_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ impl UnixSocketServer {
// fill the line buffer from the socket
let n = stream.read_buf(&mut req_buf).await?;
if n == 0 {
return Err(anyhow!("client stream exhausted"));
tracing::debug!("Client stream exhausted, likely disconnected");
return Ok(());
}
tracing::trace!("Received {}KiB stream data: {:?}", n / 1024, req_buf);

Expand Down

0 comments on commit 72500f7

Please sign in to comment.