Skip to content

Commit

Permalink
fix: error hint when hashcheck failed
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikubill committed Dec 17, 2020
1 parent dcbc283 commit 13b64ff
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions uploader.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
"github.com/cheggaaa/pb/v3"
cmap "github.com/orcaman/concurrent-map"
"hash/crc32"
"io"
"io/ioutil"
Expand All @@ -20,6 +18,9 @@ import (
"strings"
"sync"
"time"

"github.com/cheggaaa/pb/v3"
cmap "github.com/orcaman/concurrent-map"
)

const (
Expand Down Expand Up @@ -300,7 +301,7 @@ func blockPut(postURL string, buf []byte, token string) (string, error) {
if runConfig.debugMode {
log.Printf("block hashcheck failed (retrying)")
}
return "", err
return "", fmt.Errorf("block hashcheck failed")
}
}
return rBody.Ticket, nil
Expand Down

0 comments on commit 13b64ff

Please sign in to comment.