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

Commit fc5a32c

Browse files
committed
Pass locked object rather than just connection to stream constructor (246)
1 parent da1e8b6 commit fc5a32c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hyper/http20/connection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,11 +572,11 @@ def _new_stream(self, stream_id=None, local_closed=False):
572572
# self.next_stream_id in a consistent state
573573
#
574574
# No I/O occurs, the delay in waiting threads depends on their number.
575-
with self._lock, self._conn as conn:
575+
with self._lock:
576576
s = Stream(
577577
stream_id or self.next_stream_id,
578578
self.__wm_class(DEFAULT_WINDOW_SIZE),
579-
conn,
579+
self._conn,
580580
self._send_cb,
581581
self._recv_cb,
582582
self._stream_close_cb,

0 commit comments

Comments
 (0)