ignore received frames on a stream locally reset for some time (#174)

- Adds config duration for how long to ignore frames on a reset stream
- Adds config for how many reset streams can be held at a time
This commit is contained in:
Sean McArthur
2017-12-18 11:09:38 -08:00
committed by GitHub
parent edaeaa8941
commit 1ea9a8fc7e
19 changed files with 684 additions and 125 deletions

View File

@@ -109,11 +109,11 @@ where
type Error = ();
fn poll(&mut self) -> Poll<T::Error, ()> {
let poll =
self.inner.poll()
.map_err(Async::Ready)
.unwrap_err();
Ok(poll)
match self.inner.poll() {
Ok(Async::Ready(v)) => panic!("Future::unwrap_err() on an Ok value: {:?}", v),
Ok(Async::NotReady) => Ok(Async::NotReady),
Err(e) => Ok(Async::Ready(e)),
}
}
}
@@ -159,11 +159,11 @@ where
type Error = ();
fn poll(&mut self) -> Poll<T::Error, ()> {
let poll =
self.inner.poll()
.map_err(Async::Ready)
.expect_err(&self.msg);
Ok(poll)
match self.inner.poll() {
Ok(Async::Ready(v)) => panic!("{}: {:?}", self.msg, v),
Ok(Async::NotReady) => Ok(Async::NotReady),
Err(e) => Ok(Async::Ready(e)),
}
}
}