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

Commit a5edcde

Browse files
committed
Remove unnecessary early-return.
1 parent 9601ac8 commit a5edcde

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

hyper/http11/response.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,6 @@ def read(self, amt=None, decode_content=True):
129129
if self._length is not None:
130130
amt = min(amt, self._length)
131131

132-
# If we are now going to read nothing, exit early. We still need to
133-
# close the socket.
134-
if not amt:
135-
self.close(socket_close=self._expect_close)
136-
return b''
137-
138132
# Now, issue reads until we read that length. This is to account for
139133
# the fact that it's possible that we'll be asked to read more than
140134
# 65kB in one shot.

0 commit comments

Comments
 (0)