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

Commit e97de26

Browse files
committed
Update Stream.close to reflect review comments
1 parent 616b73f commit e97de26

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

hyper/http20/stream.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -280,18 +280,14 @@ def close(self, error_code=None):
280280
# FIXME: I think this is overbroad, but for now it's probably ok.
281281
if not (self.remote_closed and self.local_closed):
282282
with self._conn as conn:
283-
send = False
284-
285283
try:
286284
conn.reset_stream(self.stream_id, error_code or 0)
287285
except h2.exceptions.ProtocolError:
288286
# If for any reason we can't reset the stream, just
289287
# tolerate it.
290288
pass
291289
else:
292-
send = True
293-
if send:
294-
self._send_outstanding_data(tolerate_peer_gone=True)
290+
self._send_outstanding_data(tolerate_peer_gone=True)
295291
self.remote_closed = True
296292
self.local_closed = True
297293

0 commit comments

Comments
 (0)