From 30c839bac746956881aea7b112e490791e4f88bf Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Thu, 16 Mar 2023 10:46:24 +0100 Subject: [PATCH] fix `hasOverflow` for multiple streams (#370) Instead of repeatedly checking stream 1, properly check all of them. --- chronos/apps/http/httpbodyrw.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chronos/apps/http/httpbodyrw.nim b/chronos/apps/http/httpbodyrw.nim index b0cda66..ef9060f 100644 --- a/chronos/apps/http/httpbodyrw.nim +++ b/chronos/apps/http/httpbodyrw.nim @@ -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: