Be more lenient with streams in the pending_send queue. (#261)

The `is_peer_reset()` check doesn't quite cover all the cases where we call
`clear_queue`, such as when we call `recv_err`. Instead of trying to make the
check more precise, let's gracefully handle spurious entries in the queue.
This commit is contained in:
Geoffry Song
2018-05-09 20:01:39 -07:00
committed by Carl Lerche
parent cf62b783e0
commit 571bb14556
2 changed files with 16 additions and 22 deletions

View File

@@ -325,13 +325,6 @@ impl State {
}
}
pub fn is_peer_reset(&self) -> bool {
match self.inner {
Closed(Cause::Proto(_)) => true,
_ => false,
}
}
/// Returns true if the stream is already reset.
pub fn is_reset(&self) -> bool {
match self.inner {