Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/crypto/noise/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ pub async fn handshake<S: AsyncRead + AsyncWrite + Unpin>(
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
Expand All @@ -812,7 +812,7 @@ pub async fn handshake<S: AsyncRead + AsyncWrite + Unpin>(

// 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
Expand All @@ -823,7 +823,7 @@ pub async fn handshake<S: AsyncRead + AsyncWrite + Unpin>(

// 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
Expand Down
Loading