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

Commit f1ca5dc

Browse files
author
Tim Emiola
committed
Fix minor nits from PR feedback
- corrects the comments in _send_cb - compares with None in the check for the connection
1 parent f219416 commit f1ca5dc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

hyper/http20/connection.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def connect(self):
311311
312312
"""
313313
with self._lock:
314-
if self._sock:
314+
if self._sock is not None:
315315
return
316316

317317
if not self.proxy_host:
@@ -540,9 +540,7 @@ def _send_cb(self, data, tolerate_peer_gone=False):
540540
"""
541541
# Concurrency
542542
#
543-
# Synchronizes data writes. This also ensures that only the current
544-
# thread waits for window updates when the flow control window is
545-
# blocked.
543+
# Synchronizes data writes.
546544
#
547545
# i/o occurs while the lock is held; waiting threads will see a delay.
548546
with self._write_lock:

0 commit comments

Comments
 (0)