From a7d29c9564efc8065f89d1e53d32e3b1006511e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Sat, 15 Apr 2023 14:02:50 +0200 Subject: [PATCH] httpreader: also resume on UnexpectedEOF --- lib/httpreader/resumable.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/httpreader/resumable.go b/lib/httpreader/resumable.go index c154299b8..a0ff78596 100644 --- a/lib/httpreader/resumable.go +++ b/lib/httpreader/resumable.go @@ -98,7 +98,7 @@ func (r *ResumableReader) Read(p []byte) (n int, err error) { n, err = r.reader.Read(p) r.position += int64(n) - if err == io.EOF { + if err == io.EOF || err == io.ErrUnexpectedEOF { if r.position == r.contentLength { r.reader.Close() return n, err