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

Commit 5ba393f

Browse files
committed
If an error code is not provided to the stream's close function then assume it is a gracefull shutdown.
1 parent 92b60c5 commit 5ba393f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

hyper/http20/stream.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,9 @@ def close(self, error_code=None):
368368
:returns: Nothing.
369369
"""
370370
# Right now let's not bother with grace, let's just call close on the
371-
# connection.
372-
self._close_cb(self.stream_id, error_code)
371+
# connection. If not error code is provided then assume it is a
372+
# gracefull shutdown.
373+
self._close_cb(self.stream_id, error_code or 0)
373374

374375
def _handle_header_block(self, headers):
375376
"""

0 commit comments

Comments
 (0)