mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-24 02:59:13 +08: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 New Issue
Block a user