when receiving a GOAWAY, allow earlier streams to still process (#133)

Once all active streams have finished, send a GOAWAY back and close the
connection.
This commit is contained in:
Sean McArthur
2017-10-05 15:32:13 -07:00
committed by GitHub
parent c4ca8f7def
commit ecd2764f4b
6 changed files with 174 additions and 31 deletions

View File

@@ -16,7 +16,6 @@ impl GoAway {
}
}
#[cfg(feature = "unstable")]
pub fn last_stream_id(&self) -> StreamId {
self.last_stream_id
}
@@ -27,9 +26,7 @@ impl GoAway {
pub fn load(payload: &[u8]) -> Result<GoAway, Error> {
if payload.len() < 8 {
// Invalid payload len
// TODO: Handle error
unimplemented!();
return Err(Error::BadFrameSize);
}
let (last_stream_id, _) = StreamId::parse(&payload[..4]);