Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit 48776dd

Browse files
committed
Correctly maintain the window size.
1 parent c9633de commit 48776dd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

hyper/http20/window.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def _handle_frame(self, frame_size):
8787
"""
8888
rc = self.increase_window_size(frame_size)
8989
self.window_size -= frame_size
90+
self.window_size += rc
9091
return rc
9192

9293

test/test_windowmanager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def test_base_manager_private_interface_doesnt_function(self):
3232
def test_base_manager_decrements_window_size(self):
3333
class TestFCM(BaseFlowControlManager):
3434
def increase_window_size(self, frame_size):
35-
pass
35+
return 0
3636

3737
b = TestFCM(10, 10)
3838
b._handle_frame(5)
@@ -49,4 +49,4 @@ def test_fcm_returns_whats_given(self):
4949
b = FlowControlManager(100, 100)
5050
assert b._handle_frame(10) == 10
5151
assert b._handle_frame(30) == 30
52-
assert b.window_size == 60
52+
assert b.window_size == 100

0 commit comments

Comments
 (0)