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 {
|
if err != nil || dataSize == 0 {
|
||||||
bufPool.Put(bytesBuffer)
|
bufPool.Put(bytesBuffer)
|
||||||
<-bytesBufferLimitChan
|
<-bytesBufferLimitChan
|
||||||
uploadErrLock.Lock()
|
if err != nil {
|
||||||
uploadErr = err
|
uploadErrLock.Lock()
|
||||||
uploadErrLock.Unlock()
|
if uploadErr == nil {
|
||||||
|
uploadErr = err
|
||||||
|
}
|
||||||
|
uploadErrLock.Unlock()
|
||||||
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
if chunkOffset == 0 && !isAppend {
|
if chunkOffset == 0 && !isAppend {
|
||||||
|
|
Loading…
Reference in a new issue