Skip to content

Commit

Permalink
hyperium#607: Log error with flow control state when overflow is dete…
Browse files Browse the repository at this point in the history
…cted before panic.
  • Loading branch information
mstyura committed Nov 12, 2024
1 parent 3ac6016 commit fa1c662
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/proto/streams/flow_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,13 @@ impl FlowControl {
// If send size is zero it's meaningless to update flow control window
if sz > 0 {
// Ensure that the argument is correct
assert!(self.window_size.0 >= sz as i32);
assert!(
self.window_size.0 >= sz as i32,
"size out of window capacity sz={}; window={}; available={}",
sz,
self.window_size,
self.available
);

// Update values
self.window_size.decrease_by(sz)?;
Expand Down

0 comments on commit fa1c662

Please sign in to comment.