Browse Source
avoid overwriting non-nil uploadReaderToChunks.uploadErr with nil value (#4560)
pull/4562/head
柏杰
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
7 additions and
3 deletions
-
weed/server/filer_server_handlers_write_upload.go
|
|
@ -70,9 +70,13 @@ func (fs *FilerServer) uploadReaderToChunks(w http.ResponseWriter, r *http.Reque |
|
|
|
if err != nil || dataSize == 0 { |
|
|
|
bufPool.Put(bytesBuffer) |
|
|
|
<-bytesBufferLimitChan |
|
|
|
if err != nil { |
|
|
|
uploadErrLock.Lock() |
|
|
|
if uploadErr == nil { |
|
|
|
uploadErr = err |
|
|
|
} |
|
|
|
uploadErrLock.Unlock() |
|
|
|
} |
|
|
|
break |
|
|
|
} |
|
|
|
if chunkOffset == 0 && !isAppend { |
|
|
|