mirror of
https://github.com/status-im/nim-chronos.git
synced 2025-02-11 02:36:47 +00:00
fix hasOverflow
for multiple streams (#370)
Instead of repeatedly checking stream 1, properly check all of them.
This commit is contained in:
parent
f7835a192b
commit
30c839bac7
@ -148,7 +148,7 @@ proc hasOverflow*(bstream: HttpBodyReader): bool {.raises: [Defect].} =
|
|||||||
# ``BoundedStreamReader`` at EOF.
|
# ``BoundedStreamReader`` at EOF.
|
||||||
if bstream.streams[0].atEof():
|
if bstream.streams[0].atEof():
|
||||||
for i in 1 ..< len(bstream.streams):
|
for i in 1 ..< len(bstream.streams):
|
||||||
if not(bstream.streams[1].atEof()):
|
if not(bstream.streams[i].atEof()):
|
||||||
return true
|
return true
|
||||||
false
|
false
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user