mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-28 17:21:34 +00:00
[libp2p-ping] Properly close the substream in the InboundUpgrade. (#1606)
Not doing so may result in FIN/RST frames being sent before earlier data frames. See https://github.com/paritytech/yamux/pull/81#issuecomment-643169973.
This commit is contained in:
@ -69,6 +69,7 @@ where
|
||||
while let Ok(_) = socket.read_exact(&mut payload).await {
|
||||
socket.write_all(&payload).await?;
|
||||
}
|
||||
socket.close().await?;
|
||||
Ok(())
|
||||
}.boxed()
|
||||
}
|
||||
|
Reference in New Issue
Block a user