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 2a1f8fa commit b11a705Copy full SHA for b11a705
src/server.rs
@@ -116,6 +116,7 @@ impl Server {
116
}
117
118
async fn handle_connection(&self, stream: TcpStream) -> Result<()> {
119
+ let peer_addr = stream.peer_addr().unwrap().to_string();
120
let mut stream = Delimited::new(stream);
121
if let Some(auth) = &self.auth {
122
if let Err(err) = auth.server_handshake(&mut stream).await {
@@ -146,6 +147,7 @@ impl Server {
146
147
loop {
148
if stream.send(ServerMessage::Heartbeat).await.is_err() {
149
// Assume that the TCP connection has been dropped.
150
+ info!(peer_addr, "connection dropped after heartbeat timeout");
151
return Ok(());
152
153
const TIMEOUT: Duration = Duration::from_millis(500);
0 commit comments