mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-22 19:24:08 +00:00
Correct errors on illegal stream limits
This commit is contained in:
committed by
Dirkjan Ochtman
parent
5329a047ab
commit
7f7717ba46
@@ -2136,6 +2136,11 @@ where
|
||||
);
|
||||
}
|
||||
Frame::StreamsBlocked { dir, limit } => {
|
||||
if limit > MAX_STREAM_COUNT {
|
||||
return Err(TransportError::FRAME_ENCODING_ERROR(
|
||||
"unrepresentable stream limit",
|
||||
));
|
||||
}
|
||||
debug!(
|
||||
"peer claims to be blocked opening more than {} {} streams",
|
||||
limit, dir
|
||||
|
||||
@@ -642,7 +642,7 @@ impl Streams {
|
||||
|
||||
pub fn received_max_streams(&mut self, dir: Dir, count: u64) -> Result<(), TransportError> {
|
||||
if count > MAX_STREAM_COUNT {
|
||||
return Err(TransportError::STREAM_LIMIT_ERROR(
|
||||
return Err(TransportError::FRAME_ENCODING_ERROR(
|
||||
"unrepresentable stream limit",
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user