Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion internal/metric/metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
package metric

import (
"errors"
"io"

"github.com/go-chi/chi/v5"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
Expand Down Expand Up @@ -648,7 +651,7 @@ func AddMetricsEndpoint(metricsPath string, handler chi.Router) {
func TransferCompleted(bytesSent, bytesReceived int64, transferKind int, err error, isSFTPFs bool) {
if transferKind == 0 {
// upload
if err == nil {
if err == nil || errors.Is(err, io.EOF) {
totalUploads.Inc()
} else {
totalUploadErrors.Inc()
Expand Down