From fa1c662805478b3c49fb36cb8eb6c0d62594144d Mon Sep 17 00:00:00 2001 From: Yury Yarashevich Date: Thu, 24 Oct 2024 13:08:03 +0200 Subject: [PATCH] #607: Log error with flow control state when overflow is detected before panic. --- src/proto/streams/flow_control.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/proto/streams/flow_control.rs b/src/proto/streams/flow_control.rs index 57a935825..479bad33e 100644 --- a/src/proto/streams/flow_control.rs +++ b/src/proto/streams/flow_control.rs @@ -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)?;