reduce available window capacity when settings lowers window size
This commit is contained in:
		| @@ -126,8 +126,10 @@ impl FlowControl { | ||||
|     /// This is called after receiving a SETTINGS frame with a lower | ||||
|     /// INITIAL_WINDOW_SIZE value. | ||||
|     pub fn dec_window(&mut self, sz: WindowSize) { | ||||
|         trace!("dec_window; sz={}; window={}, available={}", sz, self.window_size, self.available); | ||||
|         // This should not be able to overflow `window_size` from the bottom. | ||||
|         self.window_size -= sz as i32; | ||||
|         self.available = self.available.saturating_sub(sz); | ||||
|     } | ||||
|  | ||||
|     /// Decrements the window reflecting data has actually been sent. The caller | ||||
|   | ||||
		Reference in New Issue
	
	Block a user