diff --git a/cmd/neofs-cli/internal/client/client.go b/cmd/neofs-cli/internal/client/client.go index 59629937fc..446aa5d147 100644 --- a/cmd/neofs-cli/internal/client/client.go +++ b/cmd/neofs-cli/internal/client/client.go @@ -3,6 +3,7 @@ package internal import ( "bytes" "context" + "errors" "fmt" "io" @@ -439,7 +440,7 @@ func PutObject(ctx context.Context, prm PutObjectPrm) (*PutObjectRes, error) { buf := make([]byte, sz) _, err = io.CopyBuffer(wrt, prm.rdr, buf) - if err != nil { + if err != nil && !errors.Is(err, io.EOF) { return nil, fmt.Errorf("copy data into object stream: %w", err) } } diff --git a/pkg/services/object/internal/client/client.go b/pkg/services/object/internal/client/client.go index 18ff3a9a54..fca466c12b 100644 --- a/pkg/services/object/internal/client/client.go +++ b/pkg/services/object/internal/client/client.go @@ -409,7 +409,7 @@ func PutObject(prm PutObjectPrm) (*PutObjectRes, error) { } _, err = w.Write(prm.obj.Payload()) - if err != nil { + if err != nil && !errors.Is(err, io.EOF) { return nil, fmt.Errorf("write object payload into stream: %w", err) }