mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
avoid overwriting non-nil uploadReaderToChunks.uploadErr with nil value (#4560)
This commit is contained in:
parent
5ee04d20fa
commit
68feffa4e6
|
@ -70,9 +70,13 @@ func (fs *FilerServer) uploadReaderToChunks(w http.ResponseWriter, r *http.Reque
|
|||
if err != nil || dataSize == 0 {
|
||||
bufPool.Put(bytesBuffer)
|
||||
<-bytesBufferLimitChan
|
||||
uploadErrLock.Lock()
|
||||
uploadErr = err
|
||||
uploadErrLock.Unlock()
|
||||
if err != nil {
|
||||
uploadErrLock.Lock()
|
||||
if uploadErr == nil {
|
||||
uploadErr = err
|
||||
}
|
||||
uploadErrLock.Unlock()
|
||||
}
|
||||
break
|
||||
}
|
||||
if chunkOffset == 0 && !isAppend {
|
||||
|
|
Loading…
Reference in a new issue