Skip to content

Commit

Permalink
only send resets on non-closed streams
Browse files Browse the repository at this point in the history
  • Loading branch information
olix0r committed Aug 18, 2017
1 parent ba38021 commit c46af0b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/proto/streams/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,13 @@ impl<B> Send<B> where B: Buf {
stream: &mut store::Ptr<B>)
-> Result<(), ConnectionError>
{
stream.state.send_reset(reason)?;
if !stream.state.is_closed() {
stream.state.send_reset(reason)?;

let frame = frame::Reset::new(stream.id, reason);
self.prioritize.queue_frame(frame.into(), stream);
}

let frame = frame::Reset::new(stream.id, reason);
self.prioritize.queue_frame(frame.into(), stream);
Ok(())
}

Expand Down

0 comments on commit c46af0b

Please sign in to comment.