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:
committed by
Carl Lerche
parent
8911ee2a4b
commit
0b289fd55d
@@ -137,13 +137,6 @@ where
|
||||
let is_initial = stream.state.recv_open(frame.is_end_stream())?;
|
||||
|
||||
if is_initial {
|
||||
let next_id = self.next_stream_id()?;
|
||||
if frame.stream_id() >= next_id {
|
||||
self.next_stream_id = frame.stream_id().next_id();
|
||||
} else {
|
||||
return Err(RecvError::Connection(ProtocolError));
|
||||
}
|
||||
|
||||
// TODO: be smarter about this logic
|
||||
if frame.stream_id() > self.last_processed_id {
|
||||
self.last_processed_id = frame.stream_id();
|
||||
|
||||
Reference in New Issue
Block a user