diff --git a/src/peer/socket.rs b/src/peer/socket.rs index 450d257..5c928e0 100644 --- a/src/peer/socket.rs +++ b/src/peer/socket.rs @@ -120,7 +120,7 @@ async fn retainer( let message = match message { Ok(message) => message, Err(err) => { - if let Err(_) = close.send(err).await { + if close.send(err).await.is_err() { log::error!("failed to notify of socket connection loss"); } return;