diff --git a/src/crypto/noise/mod.rs b/src/crypto/noise/mod.rs index 3727a6073..709ab0824 100644 --- a/src/crypto/noise/mod.rs +++ b/src/crypto/noise/mod.rs @@ -797,7 +797,7 @@ pub async fn handshake( Role::Dialer => { // write initial message let first_message = noise.first_message(Role::Dialer)?; - let _ = io.write(&first_message).await?; + io.write_all(&first_message).await?; io.flush().await?; // read back response which contains the remote peer id @@ -812,7 +812,7 @@ pub async fn handshake( // send the final message which contains local peer id let second_message = noise.second_message()?; - let _ = io.write(&second_message).await?; + io.write_all(&second_message).await?; io.flush().await?; payload @@ -823,7 +823,7 @@ pub async fn handshake( // send local peer id. let second_message = noise.second_message()?; - let _ = io.write(&second_message).await?; + io.write_all(&second_message).await?; io.flush().await?; // read remote's second message which contains their peer id