Fix stream-id double-accounting bug (#112)

Both Recv::open and Rev::recv_headers check new stream ids against the
previously stream id. The second such check fails.

Now, only Recv::open performs stream id checks.

Fixes #110
This commit is contained in:
Oliver Gould
2017-09-26 10:42:12 -07:00
committed by Carl Lerche
parent 8911ee2a4b
commit 0b289fd55d
4 changed files with 95 additions and 10 deletions

View File

@@ -116,10 +116,9 @@ impl State {
return Ok(());
}
/// Open the receive have of the stream, this action is taken when a HEADERS
/// frame is received.
/// Opens the receive-half of the stream when a HEADERS frame is received.
///
/// Returns true if this transitions the state to Open
/// Returns true if this transitions the state to Open.
pub fn recv_open(&mut self, eos: bool) -> Result<bool, RecvError> {
let remote = Peer::Streaming;
let mut initial = false;