fix `hasOverflow` for multiple streams (#370)

Instead of repeatedly checking stream 1, properly check all of them.
This commit is contained in:
Etan Kissling 2023-03-16 10:46:24 +01:00 committed by GitHub
parent f7835a192b
commit 30c839bac7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ proc hasOverflow*(bstream: HttpBodyReader): bool {.raises: [Defect].} =
# ``BoundedStreamReader`` at EOF.
if bstream.streams[0].atEof():
for i in 1 ..< len(bstream.streams):
if not(bstream.streams[1].atEof()):
if not(bstream.streams[i].atEof()):
return true
false
else: