Fix wrap reader threshold error

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
This commit is contained in:
Alexey Vanin 2024-11-08 17:45:38 +03:00
parent 5724423471
commit c3416e9184

View file

@ -593,6 +593,7 @@ func wrapReaderThreshold(input io.Reader, threshold int) io.Reader {
if err != nil {
_, _ = w.Write(buf[:cur])
_ = w.CloseWithError(err)
break
}
if cur < threshold {
continue