diff options
| author | Chris Lu <chris.lu@uber.com> | 2021-04-07 00:54:06 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@uber.com> | 2021-04-07 00:54:13 -0700 |
| commit | 3be061994fbaecf2bae8ad155064df6b580063d7 (patch) | |
| tree | 8d46e99e570c8dbf6917b4d90e470ee75ad0f41f | |
| parent | c5b08bac1b5bfed90b824bc089681ae6eca9a053 (diff) | |
| download | seaweedfs-3be061994fbaecf2bae8ad155064df6b580063d7.tar.xz seaweedfs-3be061994fbaecf2bae8ad155064df6b580063d7.zip | |
skip connection reset error
fix https://github.com/chrislusf/seaweedfs/issues/1971
this is because the connections are pooled but the volume server has reset the connection
| -rw-r--r-- | weed/operation/upload_content.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/weed/operation/upload_content.go b/weed/operation/upload_content.go index e891ae03b..40e96fd8c 100644 --- a/weed/operation/upload_content.go +++ b/weed/operation/upload_content.go @@ -235,8 +235,10 @@ func upload_content(uploadUrl string, fillBufferFunction func(w io.Writer) error // print("+") resp, post_err := HttpClient.Do(req) if post_err != nil { - glog.Errorf("upload %s %d bytes to %v: %v", filename, originalDataSize, uploadUrl, post_err) - debug.PrintStack() + if !strings.Contains(post_err.Error(), "connection reset by peer"){ + glog.Errorf("upload %s %d bytes to %v: %v", filename, originalDataSize, uploadUrl, post_err) + debug.PrintStack() + } return nil, fmt.Errorf("upload %s %d bytes to %v: %v", filename, originalDataSize, uploadUrl, post_err) } // print("-") |
