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

Commit cd594d8

Browse files
committed
Take lock when getting the stream outbound flow control window
1 parent cb86199 commit cd594d8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

hyper/http20/stream.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,9 @@ def _out_flow_control_window(self):
303303
The size of our outbound flow control window.
304304
"""
305305

306-
return self._conn._obj.local_flow_control_window(self.stream_id)
306+
with self._conn as conn:
307+
out_fc_with_size = conn.local_flow_control_window(self.stream_id)
308+
return out_fc_with_size
307309

308310
def _send_chunk(self, data, final):
309311
"""

0 commit comments

Comments
 (0)