Skip to content

Commit

Permalink
feat: Discard conn reset
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Aug 25, 2024
1 parent 310e86d commit a09b153
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/thumbnail/thumbnail.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"net/http"
"path"
"strings"
"syscall"
"time"

absto "github.com/ViBiOh/absto/pkg/model"
Expand Down Expand Up @@ -416,7 +417,7 @@ func (s Service) encodeContent(ctx context.Context, w io.Writer, isDone func() b
defer provider.BufferPool.Put(buffer)

if _, err = io.CopyBuffer(w, reader, buffer.Bytes()); err != nil {
if !absto.IsNotExist(s.storage.ConvertError(err)) {
if !absto.IsNotExist(s.storage.ConvertError(err)) && !errors.Is(err, syscall.ECONNRESET) {
logEncodeContentError(item).ErrorContext(ctx, "copy", "error", err)
}
}
Expand Down

0 comments on commit a09b153

Please sign in to comment.