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

Commit 54f5947

Browse files
committed
Do not increment the window when stream is closing.
1 parent 74a0395 commit 54f5947

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

hyper/http20/stream.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,9 @@ def receive_data(self, event):
186186
# Append the data to the buffer.
187187
self.data.append(event.data)
188188

189-
if increment and not self.remote_closed:
189+
stream_about_to_close = (event.stream_ended is not None)
190+
191+
if increment and not self.remote_closed and not stream_about_to_close:
190192
with self._conn as conn:
191193
conn.increment_flow_control_window(
192194
increment, stream_id=self.stream_id

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def run_tests(self):
7878
'Programming Language :: Python :: 3.5',
7979
'Programming Language :: Python :: Implementation :: CPython',
8080
],
81-
install_requires=['h2>=2.3,<3.0', 'hyperframe>=3.2,<4.0'],
81+
install_requires=['h2>=2.4,<3.0', 'hyperframe>=3.2,<4.0'],
8282
tests_require=['pytest', 'requests', 'mock'],
8383
cmdclass={'test': PyTest},
8484
entry_points={

0 commit comments

Comments
 (0)