We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ba91df commit 5bf6e1bCopy full SHA for 5bf6e1b
src/server.rs
@@ -98,6 +98,7 @@ impl Server {
98
}
99
100
async fn handle_connection(&self, stream: TcpStream) -> Result<()> {
101
+ let peer_addr = stream.peer_addr().unwrap().to_string();
102
let mut stream = Delimited::new(stream);
103
if let Some(auth) = &self.auth {
104
if let Err(err) = auth.server_handshake(&mut stream).await {
@@ -127,6 +128,7 @@ impl Server {
127
128
loop {
129
if stream.send(ServerMessage::Heartbeat).await.is_err() {
130
// Assume that the TCP connection has been dropped.
131
+ info!(peer_addr, "connection dropped after heartbeat timeout");
132
return Ok(());
133
134
const TIMEOUT: Duration = Duration::from_millis(500);
0 commit comments