mirror of
https://github.com/drakkan/sftpgo.git
synced 2026-03-14 14:25:52 +01:00
Merge 8979d2ce80 into 03ae0a1c84
This commit is contained in:
commit
9d0be5499e
1 changed files with 4 additions and 1 deletions
|
|
@ -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"
|
||||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue