Skip to content

Commit

Permalink
Merge pull request #44 from adafruit/ladyada-patch-1
Browse files Browse the repository at this point in the history
Toss out chunked data if we never read anything
  • Loading branch information
tannewt authored Oct 30, 2020
2 parents a2ec2a9 + c8adb21 commit 7d0e3ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adafruit_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def close(self):
return
# Make sure we've read all of our response.
if self._cached is None:
if self._remaining > 0:
if self._remaining and self._remaining > 0:
self._throw_away(self._remaining)
elif self._chunked:
while True:
Expand Down

0 comments on commit 7d0e3ba

Please sign in to comment.