Skip to content

Commit

Permalink
fix(relay): close stream once done sending
Browse files Browse the repository at this point in the history
Not explicitly closing a stream can lead to stream resets in the happy path once the stream is dropped. Instead, explicitly close the stream once the local node is done sending data.

Related: #4747.

Pull-Request: #4776.
  • Loading branch information
mxinden authored Nov 2, 2023
1 parent be2023a commit ac28488
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions protocols/relay/src/protocol/outbound_hop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ pub(crate) async fn make_reservation(stream: Stream) -> Result<Reservation, Rese

substream.send(msg).await?;

substream.close().await?;

let proto::HopMessage {
type_pb,
peer: _,
Expand Down

0 comments on commit ac28488

Please sign in to comment.